@@ -67,20 +67,18 @@ __contract__(
67
67
* Description: Add vectors of polynomials of length MLDSA_L.
68
68
* No modular reduction is performed.
69
69
*
70
- * Arguments: - polyvecl *w: pointer to output vector
71
- * - const polyvecl *u: pointer to first summand
72
- * - const polyvecl *v: pointer to second summand
70
+ * Arguments: - polyveck *u: pointer to input-output vector of polynomials to
71
+ * be added to
72
+ * - const polyveck *v: pointer to second input vector of
73
+ * polynomials
73
74
**************************************************/
74
- void polyvecl_add (polyvecl * w , const polyvecl * u , const polyvecl * v )
75
+ void polyvecl_add (polyvecl * u , const polyvecl * v )
75
76
__contract__ (
76
- requires (memory_no_alias (w , sizeof (polyvecl )))
77
77
requires (memory_no_alias (u , sizeof (polyvecl )))
78
78
requires (memory_no_alias (v , sizeof (polyvecl )))
79
- requires (forall (k0 , 0 , MLDSA_L ,
80
- forall (k1 , 0 , MLDSA_N , (int64_t ) u -> vec [k0 ].coeffs [k1 ] + v - > vec [k0 ].coeffs [k1 ] <= INT32_MAX )))
81
- requires (forall (k2 , 0 , MLDSA_L ,
82
- forall (k3 , 0 , MLDSA_N , (int64_t ) u -> vec [k2 ].coeffs [k3 ] + v - > vec [k2 ].coeffs [k3 ] >= INT32_MIN )))
83
- assigns (memory_slice (w , sizeof (polyvecl )))
79
+ requires (forall (k0 , 0 , MLDSA_L , forall (k1 , 0 , MLDSA_N , (int64_t ) u -> vec [k0 ].coeffs [k1 ] + v - > vec [k0 ].coeffs [k1 ] <= INT32_MAX )))
80
+ requires (forall (k2 , 0 , MLDSA_L , forall (k3 , 0 , MLDSA_N , (int64_t ) u -> vec [k2 ].coeffs [k3 ] + v - > vec [k2 ].coeffs [k3 ] >= INT32_MIN )))
81
+ assigns (object_whole (u ))
84
82
);
85
83
86
84
#define polyvecl_ntt MLD_NAMESPACE(polyvecl_ntt)
@@ -242,20 +240,18 @@ __contract__(
242
240
* Description: Add vectors of polynomials of length MLDSA_K.
243
241
* No modular reduction is performed.
244
242
*
245
- * Arguments: - polyveck *w: pointer to output vector
246
- * - const polyveck *u: pointer to first summand
247
- * - const polyveck *v: pointer to second summand
243
+ * Arguments: - polyveck *u: pointer to input-output vector of polynomials to
244
+ * be added to
245
+ * - const polyveck *v: pointer to second input vector of
246
+ * polynomials
248
247
**************************************************/
249
- void polyveck_add (polyveck * w , const polyveck * u , const polyveck * v )
248
+ void polyveck_add (polyveck * u , const polyveck * v )
250
249
__contract__ (
251
- requires (memory_no_alias (w , sizeof (polyveck )))
252
250
requires (memory_no_alias (u , sizeof (polyveck )))
253
251
requires (memory_no_alias (v , sizeof (polyveck )))
254
- requires (forall (k0 , 0 , MLDSA_K ,
255
- forall (k1 , 0 , MLDSA_N , (int64_t ) u -> vec [k0 ].coeffs [k1 ] + v - > vec [k0 ].coeffs [k1 ] <= INT32_MAX )))
256
- requires (forall (k2 , 0 , MLDSA_K ,
257
- forall (k3 , 0 , MLDSA_N , (int64_t ) u -> vec [k2 ].coeffs [k3 ] + v - > vec [k2 ].coeffs [k3 ] >= INT32_MIN )))
258
- assigns (memory_slice (w , sizeof (polyveck )))
252
+ requires (forall (k0 , 0 , MLDSA_K , forall (k1 , 0 , MLDSA_N , (int64_t ) u -> vec [k0 ].coeffs [k1 ] + v - > vec [k0 ].coeffs [k1 ] <= INT32_MAX )))
253
+ requires (forall (k2 , 0 , MLDSA_K , forall (k3 , 0 , MLDSA_N , (int64_t ) u -> vec [k2 ].coeffs [k3 ] + v - > vec [k2 ].coeffs [k3 ] >= INT32_MIN )))
254
+ assigns (object_whole (u ))
259
255
);
260
256
261
257
#define polyveck_sub MLD_NAMESPACE(polyveck_sub)
0 commit comments