Lines Matching refs:modq
145 typedef crypto_int16 modq; typedef
148 static inline int modq_nonzero_mask(modq x) in modq_nonzero_mask()
158 static inline modq modq_freeze(crypto_int32 a) in modq_freeze()
165 static inline modq modq_minusproduct(modq a,modq b,modq c) in modq_minusproduct()
173 static inline modq modq_plusproduct(modq a,modq b,modq c) in modq_plusproduct()
181 static inline modq modq_product(modq a,modq b) in modq_product()
188 static inline modq modq_square(modq a) in modq_square()
194 static inline modq modq_sum(modq a,modq b) in modq_sum()
201 static inline modq modq_reciprocal(modq a1) in modq_reciprocal()
203 modq a2 = modq_square(a1); in modq_reciprocal()
204 modq a3 = modq_product(a2,a1); in modq_reciprocal()
205 modq a4 = modq_square(a2); in modq_reciprocal()
206 modq a8 = modq_square(a4); in modq_reciprocal()
207 modq a16 = modq_square(a8); in modq_reciprocal()
208 modq a32 = modq_square(a16); in modq_reciprocal()
209 modq a35 = modq_product(a32,a3); in modq_reciprocal()
210 modq a70 = modq_square(a35); in modq_reciprocal()
211 modq a140 = modq_square(a70); in modq_reciprocal()
212 modq a143 = modq_product(a140,a3); in modq_reciprocal()
213 modq a286 = modq_square(a143); in modq_reciprocal()
214 modq a572 = modq_square(a286); in modq_reciprocal()
215 modq a1144 = modq_square(a572); in modq_reciprocal()
216 modq a1147 = modq_product(a1144,a3); in modq_reciprocal()
217 modq a2294 = modq_square(a1147); in modq_reciprocal()
218 modq a4588 = modq_square(a2294); in modq_reciprocal()
219 modq a4589 = modq_product(a4588,a1); in modq_reciprocal()
223 static inline modq modq_quotient(modq num,modq den) in modq_quotient()
262 static void rq_encode(unsigned char *,const modq *);
264 static void rq_decode(modq *,const unsigned char *);
266 static void rq_encoderounded(unsigned char *,const modq *);
268 static void rq_decoderounded(modq *,const unsigned char *);
270 static void rq_round3(modq *,const modq *);
272 static void rq_mult(modq *,const modq *,const small *);
274 int rq_recip3(modq *,const small *);
300 modq h[p]; in crypto_kem_sntrup4591761_dec()
302 modq c[p]; in crypto_kem_sntrup4591761_dec()
303 modq t[p]; in crypto_kem_sntrup4591761_dec()
306 modq hr[p]; in crypto_kem_sntrup4591761_dec()
366 modq h[p]; in crypto_kem_sntrup4591761_enc()
367 modq c[p]; in crypto_kem_sntrup4591761_enc()
414 modq f3recip[p]; in crypto_kem_sntrup4591761_keypair()
415 modq h[p]; in crypto_kem_sntrup4591761_keypair()
626 static void rq_encode(unsigned char *c,const modq *f) in rq_encode()
662 static void rq_decode(modq *f,const unsigned char *c) in rq_decode()
755 static void rq_mult(modq *h,const modq *f,const small *g) in rq_mult()
757 modq fg[p + p - 1]; in rq_mult()
758 modq result; in rq_mult()
793 static void vectormodq_product(modq *z,int len,const modq *x,const modq c) in vectormodq_product()
799 static void vectormodq_minusproduct(modq *z,int len,const modq *x,const modq *y,const modq c) in vectormodq_minusproduct()
805 static void vectormodq_shift(modq *z,int len) in vectormodq_shift()
818 int rq_recip3(modq *r,const small *s) in rq_recip3()
822 modq f[p + 1]; in rq_recip3()
823 modq g[p + 1]; in rq_recip3()
824 modq u[2*p + 2]; in rq_recip3()
825 modq v[2*p + 2]; in rq_recip3()
826 modq c; in rq_recip3()
891 swap(f,g,(p + 1) * sizeof(modq),swapmask); in rq_recip3()
894 swap(u,v,(loops + 1) * sizeof(modq),swapmask); in rq_recip3()
897 swap(u,v,(loop + 1) * sizeof(modq),swapmask); in rq_recip3()
899 swap(u + loop - p,v + loop - p,(p + 1) * sizeof(modq),swapmask); in rq_recip3()
913 static void rq_round3(modq *h,const modq *f) in rq_round3()
925 static void rq_encoderounded(unsigned char *c,const modq *f) in rq_encoderounded()
959 static void rq_decoderounded(modq *f,const unsigned char *c) in rq_decoderounded()