Lines Matching refs:N

40                                      const mbedtls_mpi_mod_modulus *N,  in mbedtls_mpi_mod_raw_cond_assign()  argument
43 mbedtls_mpi_core_cond_assign(X, A, N->limbs, assign); in mbedtls_mpi_mod_raw_cond_assign()
48 const mbedtls_mpi_mod_modulus *N, in mbedtls_mpi_mod_raw_cond_swap() argument
51 mbedtls_mpi_core_cond_swap(X, Y, N->limbs, swap); in mbedtls_mpi_mod_raw_cond_swap()
55 const mbedtls_mpi_mod_modulus *N, in mbedtls_mpi_mod_raw_read() argument
64 ret = mbedtls_mpi_core_read_le(X, N->limbs, in mbedtls_mpi_mod_raw_read()
68 ret = mbedtls_mpi_core_read_be(X, N->limbs, in mbedtls_mpi_mod_raw_read()
79 if (!mbedtls_mpi_core_lt_ct(X, N->p, N->limbs)) { in mbedtls_mpi_mod_raw_read()
90 const mbedtls_mpi_mod_modulus *N, in mbedtls_mpi_mod_raw_write() argument
97 return mbedtls_mpi_core_write_le(A, N->limbs, in mbedtls_mpi_mod_raw_write()
100 return mbedtls_mpi_core_write_be(A, N->limbs, in mbedtls_mpi_mod_raw_write()
116 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_sub() argument
118 mbedtls_mpi_uint c = mbedtls_mpi_core_sub(X, A, B, N->limbs); in mbedtls_mpi_mod_raw_sub()
120 (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) c); in mbedtls_mpi_mod_raw_sub()
127 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_fix_quasi_reduction() argument
129 mbedtls_mpi_uint c = mbedtls_mpi_core_sub(X, X, N->p, N->limbs); in mbedtls_mpi_mod_raw_fix_quasi_reduction()
131 (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) c); in mbedtls_mpi_mod_raw_fix_quasi_reduction()
139 const mbedtls_mpi_mod_modulus *N, in mbedtls_mpi_mod_raw_mul() argument
142 mbedtls_mpi_core_montmul(X, A, B, N->limbs, N->p, N->limbs, in mbedtls_mpi_mod_raw_mul()
143 N->rep.mont.mm, T); in mbedtls_mpi_mod_raw_mul()
161 const mbedtls_mpi_uint *N, in mbedtls_mpi_mod_raw_inv_prime() argument
173 (void) mbedtls_mpi_core_sub_int(Nminus2, N, 2, AN_limbs); in mbedtls_mpi_mod_raw_inv_prime()
177 A, N, AN_limbs, Nminus2, AN_limbs, in mbedtls_mpi_mod_raw_inv_prime()
191 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_add() argument
194 carry = mbedtls_mpi_core_add(X, A, B, N->limbs); in mbedtls_mpi_mod_raw_add()
195 borrow = mbedtls_mpi_core_sub(X, X, N->p, N->limbs); in mbedtls_mpi_mod_raw_add()
196 (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) (carry ^ borrow)); in mbedtls_mpi_mod_raw_add()
204 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_canonical_to_modulus_rep() argument
206 switch (N->int_rep) { in mbedtls_mpi_mod_raw_canonical_to_modulus_rep()
208 return mbedtls_mpi_mod_raw_to_mont_rep(X, N); in mbedtls_mpi_mod_raw_canonical_to_modulus_rep()
218 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_modulus_to_canonical_rep() argument
220 switch (N->int_rep) { in mbedtls_mpi_mod_raw_modulus_to_canonical_rep()
222 return mbedtls_mpi_mod_raw_from_mont_rep(X, N); in mbedtls_mpi_mod_raw_modulus_to_canonical_rep()
232 const mbedtls_mpi_mod_modulus *N, in mbedtls_mpi_mod_raw_random() argument
236 int ret = mbedtls_mpi_core_random(X, min, N->p, N->limbs, f_rng, p_rng); in mbedtls_mpi_mod_raw_random()
240 return mbedtls_mpi_mod_raw_canonical_to_modulus_rep(X, N); in mbedtls_mpi_mod_raw_random()
247 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_to_mont_rep() argument
250 const size_t t_limbs = mbedtls_mpi_core_montmul_working_limbs(N->limbs); in mbedtls_mpi_mod_raw_to_mont_rep()
256 mbedtls_mpi_core_to_mont_rep(X, X, N->p, N->limbs, in mbedtls_mpi_mod_raw_to_mont_rep()
257 N->rep.mont.mm, N->rep.mont.rr, T); in mbedtls_mpi_mod_raw_to_mont_rep()
265 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_from_mont_rep() argument
267 const size_t t_limbs = mbedtls_mpi_core_montmul_working_limbs(N->limbs); in mbedtls_mpi_mod_raw_from_mont_rep()
274 mbedtls_mpi_core_from_mont_rep(X, X, N->p, N->limbs, N->rep.mont.mm, T); in mbedtls_mpi_mod_raw_from_mont_rep()
283 const mbedtls_mpi_mod_modulus *N) in mbedtls_mpi_mod_raw_neg() argument
285 mbedtls_mpi_core_sub(X, N->p, A, N->limbs); in mbedtls_mpi_mod_raw_neg()
289 mbedtls_mpi_uint borrow = mbedtls_mpi_core_sub(X, X, N->p, N->limbs); in mbedtls_mpi_mod_raw_neg()
290 (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) borrow); in mbedtls_mpi_mod_raw_neg()