Skip to content

Commit 438ad7f

Browse files
committed
add changes
Signed-off-by: willieyz <willie.zhao@chelpis.com>
1 parent ac09060 commit 438ad7f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

dev/x86_64/src/arith_native_x86_64.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ __contract__(
131131

132132
#define mlk_ntttobytes_avx2 MLK_NAMESPACE(ntttobytes_avx2)
133133
void mlk_ntttobytes_avx2(uint8_t *r, const int16_t *a)
134+
/* This must be kept in sync with the HOL-Light specification in
135+
* proofs/hol_light/x86/proofs/mlkem_tobytes.ml.
136+
*/
134137
__contract__(
135138
requires(memory_no_alias(r, MLKEM_POLYBYTES))
136139
requires(memory_no_alias(a, sizeof(int16_t) * MLKEM_N))
@@ -140,6 +143,9 @@ __contract__(
140143

141144
#define mlk_nttfrombytes_avx2 MLK_NAMESPACE(nttfrombytes_avx2)
142145
void mlk_nttfrombytes_avx2(int16_t *r, const uint8_t *a)
146+
/* This must be kept in sync with the HOL-Light specification in
147+
* proofs/hol_light/x86/proofs/mlkem_frombytes.ml.
148+
*/
143149
__contract__(
144150
requires(memory_no_alias(a, MLKEM_POLYBYTES))
145151
requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
@@ -149,6 +155,9 @@ __contract__(
149155

150156
#define mlk_tomont_avx2 MLK_NAMESPACE(tomont_avx2)
151157
void mlk_tomont_avx2(int16_t *r, const int16_t *qdata)
158+
/* This must be kept in sync with the HOL-Light specification in
159+
* proofs/hol_light/x86/proofs/mlkem_tomont.ml.
160+
*/
152161
__contract__(
153162
requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
154163
requires(qdata == mlk_qdata)

mlkem/src/native/x86_64/src/arith_native_x86_64.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ __contract__(
131131

132132
#define mlk_ntttobytes_avx2 MLK_NAMESPACE(ntttobytes_avx2)
133133
void mlk_ntttobytes_avx2(uint8_t *r, const int16_t *a)
134+
/* This must be kept in sync with the HOL-Light specification in
135+
* proofs/hol_light/x86/proofs/mlkem_tobytes.ml.
136+
*/
134137
__contract__(
135138
requires(memory_no_alias(r, MLKEM_POLYBYTES))
136139
requires(memory_no_alias(a, sizeof(int16_t) * MLKEM_N))
@@ -140,6 +143,9 @@ __contract__(
140143

141144
#define mlk_nttfrombytes_avx2 MLK_NAMESPACE(nttfrombytes_avx2)
142145
void mlk_nttfrombytes_avx2(int16_t *r, const uint8_t *a)
146+
/* This must be kept in sync with the HOL-Light specification in
147+
* proofs/hol_light/x86/proofs/mlkem_frombytes.ml.
148+
*/
143149
__contract__(
144150
requires(memory_no_alias(a, MLKEM_POLYBYTES))
145151
requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
@@ -149,6 +155,9 @@ __contract__(
149155

150156
#define mlk_tomont_avx2 MLK_NAMESPACE(tomont_avx2)
151157
void mlk_tomont_avx2(int16_t *r, const int16_t *qdata)
158+
/* This must be kept in sync with the HOL-Light specification in
159+
* proofs/hol_light/x86/proofs/mlkem_tomont.ml.
160+
*/
152161
__contract__(
153162
requires(memory_no_alias(r, sizeof(int16_t) * MLKEM_N))
154163
requires(qdata == mlk_qdata)

0 commit comments

Comments
 (0)