Skip to content

Commit fb886a2

Browse files
rod-chapmanhanno-becker
authored andcommitted
Correct declaration and comments re size of rej-uniform lookup table
Signed-off-by: Rod Chapman <rodchap@amazon.com>
1 parent 5d6774a commit fb886a2

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

dev/aarch64_clean/src/arith_native_aarch64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ __contract__(
161161
#define mlk_rej_uniform_asm MLK_NAMESPACE(rej_uniform_asm)
162162
MLK_MUST_CHECK_RETURN_VALUE
163163
uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf,
164-
unsigned buflen, const uint8_t table[2048])
164+
unsigned buflen, const uint8_t table[4096])
165165
/* This must be kept in sync with the HOL-Light specification
166166
* in proofs/hol_light/aarch64/proofs/mlkem_rej_uniform.ml. */
167167
__contract__(

dev/aarch64_clean/src/rej_uniform_asm.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/*yaml
77
Name: rej_uniform_asm
88
Description: Run rejection sampling on uniform random bytes to generate uniform random integers mod q
9-
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[2048])
9+
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[4096])
1010
ABI:
1111
x0:
1212
type: buffer
@@ -27,9 +27,9 @@
2727
test_with: 504 # MLKEM_GEN_MATRIX_NBLOCKS * MLK_XOF_RATE
2828
x3:
2929
type: buffer
30-
size_bytes: 2048
30+
size_bytes: 4096
3131
permissions: read-only
32-
c_parameter: const uint8_t table[2048]
32+
c_parameter: const uint8_t table[4096]
3333
description: Lookup table
3434
Stack:
3535
bytes: 576

dev/aarch64_opt/src/arith_native_aarch64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ __contract__(
161161
#define mlk_rej_uniform_asm MLK_NAMESPACE(rej_uniform_asm)
162162
MLK_MUST_CHECK_RETURN_VALUE
163163
uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf,
164-
unsigned buflen, const uint8_t table[2048])
164+
unsigned buflen, const uint8_t table[4096])
165165
/* This must be kept in sync with the HOL-Light specification
166166
* in proofs/hol_light/aarch64/proofs/mlkem_rej_uniform.ml. */
167167
__contract__(

dev/aarch64_opt/src/rej_uniform_asm.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/*yaml
77
Name: rej_uniform_asm
88
Description: Run rejection sampling on uniform random bytes to generate uniform random integers mod q
9-
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[2048])
9+
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[4096])
1010
ABI:
1111
x0:
1212
type: buffer
@@ -27,9 +27,9 @@
2727
test_with: 504 # MLKEM_GEN_MATRIX_NBLOCKS * MLK_XOF_RATE
2828
x3:
2929
type: buffer
30-
size_bytes: 2048
30+
size_bytes: 4096
3131
permissions: read-only
32-
c_parameter: const uint8_t table[2048]
32+
c_parameter: const uint8_t table[4096]
3333
description: Lookup table
3434
Stack:
3535
bytes: 576

mlkem/src/native/aarch64/src/arith_native_aarch64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ __contract__(
161161
#define mlk_rej_uniform_asm MLK_NAMESPACE(rej_uniform_asm)
162162
MLK_MUST_CHECK_RETURN_VALUE
163163
uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf,
164-
unsigned buflen, const uint8_t table[2048])
164+
unsigned buflen, const uint8_t table[4096])
165165
/* This must be kept in sync with the HOL-Light specification
166166
* in proofs/hol_light/aarch64/proofs/mlkem_rej_uniform.ml. */
167167
__contract__(

mlkem/src/native/aarch64/src/rej_uniform_asm.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/*yaml
77
Name: rej_uniform_asm
88
Description: Run rejection sampling on uniform random bytes to generate uniform random integers mod q
9-
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[2048])
9+
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[4096])
1010
ABI:
1111
x0:
1212
type: buffer
@@ -27,9 +27,9 @@
2727
test_with: 504 # MLKEM_GEN_MATRIX_NBLOCKS * MLK_XOF_RATE
2828
x3:
2929
type: buffer
30-
size_bytes: 2048
30+
size_bytes: 4096
3131
permissions: read-only
32-
c_parameter: const uint8_t table[2048]
32+
c_parameter: const uint8_t table[4096]
3333
description: Lookup table
3434
Stack:
3535
bytes: 576

proofs/hol_light/aarch64/mlkem/mlkem_rej_uniform.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/*yaml
77
Name: rej_uniform_asm
88
Description: Run rejection sampling on uniform random bytes to generate uniform random integers mod q
9-
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[2048])
9+
Signature: uint64_t mlk_rej_uniform_asm(int16_t r[256], const uint8_t *buf, unsigned buflen, const uint8_t table[4096])
1010
ABI:
1111
x0:
1212
type: buffer
@@ -27,9 +27,9 @@
2727
test_with: 504 # MLKEM_GEN_MATRIX_NBLOCKS * MLK_XOF_RATE
2828
x3:
2929
type: buffer
30-
size_bytes: 2048
30+
size_bytes: 4096
3131
permissions: read-only
32-
c_parameter: const uint8_t table[2048]
32+
c_parameter: const uint8_t table[4096]
3333
description: Lookup table
3434
Stack:
3535
bytes: 576

0 commit comments

Comments
 (0)