@@ -147,17 +147,59 @@ __contract__(
147147
148148#define mld_polyvecl_pointwise_acc_montgomery_l4_asm \
149149 MLD_NAMESPACE(polyvecl_pointwise_acc_montgomery_l4_asm)
150- void mld_polyvecl_pointwise_acc_montgomery_l4_asm (int32_t * , const int32_t * ,
151- const int32_t * );
150+ void mld_polyvecl_pointwise_acc_montgomery_l4_asm (int32_t * r ,
151+ const int32_t a [4 ][MLDSA_N ],
152+ const int32_t b [4 ][MLDSA_N ])
153+ /* This must be kept in sync with the HOL-Light specification
154+ * in proofs/hol_light/aarch64/proofs/mldsa_pointwise_acc_l4.ml */
155+ __contract__ (
156+ requires (memory_no_alias (r , sizeof (int32_t ) * MLDSA_N ))
157+ requires (memory_no_alias (a , sizeof (int32_t ) * 4 * MLDSA_N ))
158+ requires (memory_no_alias (b , sizeof (int32_t ) * 4 * MLDSA_N ))
159+ /* check-magic: off */
160+ requires (forall (l0 , 0 , 4 , array_abs_bound (a [l0 ], 0 , MLDSA_N , 8380417 )))
161+ requires (forall (l1 , 0 , 4 , array_abs_bound (b [l1 ], 0 , MLDSA_N , 75423753 )))
162+ assigns (memory_slice (r , sizeof (int32_t ) * MLDSA_N ))
163+ ensures (array_abs_bound (r , 0 , MLDSA_N , 8380417 ))
164+ /* check-magic: on */
165+ );
152166
153167#define mld_polyvecl_pointwise_acc_montgomery_l5_asm \
154168 MLD_NAMESPACE(polyvecl_pointwise_acc_montgomery_l5_asm)
155- void mld_polyvecl_pointwise_acc_montgomery_l5_asm (int32_t * , const int32_t * ,
156- const int32_t * );
169+ void mld_polyvecl_pointwise_acc_montgomery_l5_asm (int32_t * r ,
170+ const int32_t a [5 ][MLDSA_N ],
171+ const int32_t b [5 ][MLDSA_N ])
172+ /* This must be kept in sync with the HOL-Light specification
173+ * in proofs/hol_light/aarch64/proofs/mldsa_pointwise_acc_l5.ml */
174+ __contract__ (
175+ requires (memory_no_alias (r , sizeof (int32_t ) * MLDSA_N ))
176+ requires (memory_no_alias (a , sizeof (int32_t ) * 5 * MLDSA_N ))
177+ requires (memory_no_alias (b , sizeof (int32_t ) * 5 * MLDSA_N ))
178+ /* check-magic: off */
179+ requires (forall (l0 , 0 , 5 , array_abs_bound (a [l0 ], 0 , MLDSA_N , 8380417 )))
180+ requires (forall (l1 , 0 , 5 , array_abs_bound (b [l1 ], 0 , MLDSA_N , 75423753 )))
181+ assigns (memory_slice (r , sizeof (int32_t ) * MLDSA_N ))
182+ ensures (array_abs_bound (r , 0 , MLDSA_N , 8380417 ))
183+ /* check-magic: on */
184+ );
157185
158186#define mld_polyvecl_pointwise_acc_montgomery_l7_asm \
159187 MLD_NAMESPACE(polyvecl_pointwise_acc_montgomery_l7_asm)
160- void mld_polyvecl_pointwise_acc_montgomery_l7_asm (int32_t * , const int32_t * ,
161- const int32_t * );
188+ void mld_polyvecl_pointwise_acc_montgomery_l7_asm (int32_t * r ,
189+ const int32_t a [7 ][MLDSA_N ],
190+ const int32_t b [7 ][MLDSA_N ])
191+ /* This must be kept in sync with the HOL-Light specification
192+ * in proofs/hol_light/aarch64/proofs/mldsa_pointwise_acc_l7.ml */
193+ __contract__ (
194+ requires (memory_no_alias (r , sizeof (int32_t ) * MLDSA_N ))
195+ requires (memory_no_alias (a , sizeof (int32_t ) * 7 * MLDSA_N ))
196+ requires (memory_no_alias (b , sizeof (int32_t ) * 7 * MLDSA_N ))
197+ /* check-magic: off */
198+ requires (forall (l0 , 0 , 7 , array_abs_bound (a [l0 ], 0 , MLDSA_N , 8380417 )))
199+ requires (forall (l1 , 0 , 7 , array_abs_bound (b [l1 ], 0 , MLDSA_N , 75423753 )))
200+ assigns (memory_slice (r , sizeof (int32_t ) * MLDSA_N ))
201+ ensures (array_abs_bound (r , 0 , MLDSA_N , 8380417 ))
202+ /* check-magic: on */
203+ );
162204
163205#endif /* !MLD_NATIVE_AARCH64_SRC_ARITH_NATIVE_AARCH64_H */
0 commit comments