Fix bug in HRSS tests.
I moved the |poly3_rand| code into a function and omitted to update a |sizeof|. Change-Id: I861fac4fe26ee3b5e5116d5cee71e64d9af9d175 Reviewed-on: https://boringssl-review.googlesource.com/c/33564 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com>
This commit is contained in:
parent
7b935937b1
commit
2526c66b72
@ -76,7 +76,7 @@ TEST(HRSS, Poly2RotateRight) {
|
|||||||
|
|
||||||
// poly3_rand sets |r| to a random value (albeit with bias).
|
// poly3_rand sets |r| to a random value (albeit with bias).
|
||||||
static void poly3_rand(poly3 *p) {
|
static void poly3_rand(poly3 *p) {
|
||||||
RAND_bytes(reinterpret_cast<uint8_t *>(p), sizeof(p));
|
RAND_bytes(reinterpret_cast<uint8_t *>(p), sizeof(poly3));
|
||||||
p->s.v[WORDS_PER_POLY - 1] &= (UINT64_C(1) << BITS_IN_LAST_WORD) - 1;
|
p->s.v[WORDS_PER_POLY - 1] &= (UINT64_C(1) << BITS_IN_LAST_WORD) - 1;
|
||||||
p->a.v[WORDS_PER_POLY - 1] &= (UINT64_C(1) << BITS_IN_LAST_WORD) - 1;
|
p->a.v[WORDS_PER_POLY - 1] &= (UINT64_C(1) << BITS_IN_LAST_WORD) - 1;
|
||||||
// (s, a) = (1, 1) is invalid. Map those to one.
|
// (s, a) = (1, 1) is invalid. Map those to one.
|
||||||
|
Loading…
Reference in New Issue
Block a user