@@ -152,17 +152,59 @@ __contract__(
152152
153153#define mld_polyvecl_pointwise_acc_montgomery_l4_asm \
154154 MLD_NAMESPACE(polyvecl_pointwise_acc_montgomery_l4_asm)
155- void mld_polyvecl_pointwise_acc_montgomery_l4_asm (int32_t * , const int32_t * ,
156- const int32_t * );
155+ void mld_polyvecl_pointwise_acc_montgomery_l4_asm (int32_t * r ,
156+ const int32_t a [4 ][MLDSA_N ],
157+ const int32_t b [4 ][MLDSA_N ])
158+ /* This must be kept in sync with the HOL-Light specification
159+ * in proofs/hol_light/aarch64/proofs/mldsa_pointwise_acc_l4.ml */
160+ __contract__ (
161+ requires (memory_no_alias (r , sizeof (int32_t ) * MLDSA_N ))
162+ requires (memory_no_alias (a , sizeof (int32_t ) * 4 * MLDSA_N ))
163+ requires (memory_no_alias (b , sizeof (int32_t ) * 4 * MLDSA_N ))
164+ /* check-magic: off */
165+ requires (forall (l0 , 0 , 4 , array_abs_bound (a [l0 ], 0 , MLDSA_N , 8380417 )))
166+ requires (forall (l1 , 0 , 4 , array_abs_bound (b [l1 ], 0 , MLDSA_N , 75423753 )))
167+ assigns (memory_slice (r , sizeof (int32_t ) * MLDSA_N ))
168+ ensures (array_abs_bound (r , 0 , MLDSA_N , 8380417 ))
169+ /* check-magic: on */
170+ );
157171
158172#define mld_polyvecl_pointwise_acc_montgomery_l5_asm \
159173 MLD_NAMESPACE(polyvecl_pointwise_acc_montgomery_l5_asm)
160- void mld_polyvecl_pointwise_acc_montgomery_l5_asm (int32_t * , const int32_t * ,
161- const int32_t * );
174+ void mld_polyvecl_pointwise_acc_montgomery_l5_asm (int32_t * r ,
175+ const int32_t a [5 ][MLDSA_N ],
176+ const int32_t b [5 ][MLDSA_N ])
177+ /* This must be kept in sync with the HOL-Light specification
178+ * in proofs/hol_light/aarch64/proofs/mldsa_pointwise_acc_l5.ml */
179+ __contract__ (
180+ requires (memory_no_alias (r , sizeof (int32_t ) * MLDSA_N ))
181+ requires (memory_no_alias (a , sizeof (int32_t ) * 5 * MLDSA_N ))
182+ requires (memory_no_alias (b , sizeof (int32_t ) * 5 * MLDSA_N ))
183+ /* check-magic: off */
184+ requires (forall (l0 , 0 , 5 , array_abs_bound (a [l0 ], 0 , MLDSA_N , 8380417 )))
185+ requires (forall (l1 , 0 , 5 , array_abs_bound (b [l1 ], 0 , MLDSA_N , 75423753 )))
186+ assigns (memory_slice (r , sizeof (int32_t ) * MLDSA_N ))
187+ ensures (array_abs_bound (r , 0 , MLDSA_N , 8380417 ))
188+ /* check-magic: on */
189+ );
162190
163191#define mld_polyvecl_pointwise_acc_montgomery_l7_asm \
164192 MLD_NAMESPACE(polyvecl_pointwise_acc_montgomery_l7_asm)
165- void mld_polyvecl_pointwise_acc_montgomery_l7_asm (int32_t * , const int32_t * ,
166- const int32_t * );
193+ void mld_polyvecl_pointwise_acc_montgomery_l7_asm (int32_t * r ,
194+ const int32_t a [7 ][MLDSA_N ],
195+ const int32_t b [7 ][MLDSA_N ])
196+ /* This must be kept in sync with the HOL-Light specification
197+ * in proofs/hol_light/aarch64/proofs/mldsa_pointwise_acc_l7.ml */
198+ __contract__ (
199+ requires (memory_no_alias (r , sizeof (int32_t ) * MLDSA_N ))
200+ requires (memory_no_alias (a , sizeof (int32_t ) * 7 * MLDSA_N ))
201+ requires (memory_no_alias (b , sizeof (int32_t ) * 7 * MLDSA_N ))
202+ /* check-magic: off */
203+ requires (forall (l0 , 0 , 7 , array_abs_bound (a [l0 ], 0 , MLDSA_N , 8380417 )))
204+ requires (forall (l1 , 0 , 7 , array_abs_bound (b [l1 ], 0 , MLDSA_N , 75423753 )))
205+ assigns (memory_slice (r , sizeof (int32_t ) * MLDSA_N ))
206+ ensures (array_abs_bound (r , 0 , MLDSA_N , 8380417 ))
207+ /* check-magic: on */
208+ );
167209
168210#endif /* !MLD_NATIVE_AARCH64_SRC_ARITH_NATIVE_AARCH64_H */
0 commit comments