Lines Matching refs:mbedtls_mpi_uint
67 #define ciL (sizeof(mbedtls_mpi_uint)) /* chars in limb */
83 static void mbedtls_mpi_zeroize( mbedtls_mpi_uint *v, size_t n ) in mbedtls_mpi_zeroize()
138 mbedtls_mpi_uint *p; in mbedtls_mpi_grow()
155 p = (mbedtls_mpi_uint*)mbedtls_calloc( nblimbs, ciL ); in mbedtls_mpi_grow()
183 mbedtls_mpi_uint *p; in mbedtls_mpi_shrink()
212 p = (mbedtls_mpi_uint*)mbedtls_calloc( i, ciL ); in mbedtls_mpi_shrink()
377 X->p[off] &= ~( (mbedtls_mpi_uint) 0x01 << idx ); in mbedtls_mpi_set_bit()
378 X->p[off] |= (mbedtls_mpi_uint) val << idx; in mbedtls_mpi_set_bit()
404 static size_t mbedtls_clz( const mbedtls_mpi_uint x ) in mbedtls_clz()
407 mbedtls_mpi_uint mask = (mbedtls_mpi_uint) 1 << (biL - 1); in mbedtls_clz()
449 static int mpi_get_digit( mbedtls_mpi_uint *d, int radix, char c ) in mpi_get_digit()
457 if( *d >= (mbedtls_mpi_uint) radix ) in mpi_get_digit()
471 mbedtls_mpi_uint d; in mbedtls_mpi_read_string()
540 mbedtls_mpi_uint r; in mpi_write_hlp()
665 mbedtls_mpi_uint d; in mbedtls_mpi_read_file()
746 static mbedtls_mpi_uint mpi_uint_bigendian_to_host_c( mbedtls_mpi_uint x ) in mpi_uint_bigendian_to_host_c()
750 mbedtls_mpi_uint tmp = 0; in mpi_uint_bigendian_to_host_c()
755 tmp |= (mbedtls_mpi_uint) *x_ptr; in mpi_uint_bigendian_to_host_c()
761 static mbedtls_mpi_uint mpi_uint_bigendian_to_host( mbedtls_mpi_uint x ) in mpi_uint_bigendian_to_host()
788 switch( sizeof(mbedtls_mpi_uint) ) in mpi_uint_bigendian_to_host()
804 static void mpi_bigendian_to_host( mbedtls_mpi_uint * const p, size_t limbs ) in mpi_bigendian_to_host()
806 mbedtls_mpi_uint *cur_limb_left; in mpi_bigendian_to_host()
807 mbedtls_mpi_uint *cur_limb_right; in mpi_bigendian_to_host()
824 mbedtls_mpi_uint tmp; in mpi_bigendian_to_host()
847 X->p[i / ciL] |= ((mbedtls_mpi_uint) buf[i]) << ((i % ciL) << 3); in mbedtls_mpi_read_binary_le()
987 mbedtls_mpi_uint r0 = 0, r1; in mbedtls_mpi_shift_l()
1037 mbedtls_mpi_uint r0 = 0, r1; in mbedtls_mpi_shift_r()
1148 mbedtls_mpi_uint p[1]; in mbedtls_mpi_cmp_int()
1166 mbedtls_mpi_uint *o, *p, c, tmp; in mbedtls_mpi_add_abs()
1235 static mbedtls_mpi_uint mpi_sub_hlp( size_t n, in mpi_sub_hlp()
1236 mbedtls_mpi_uint *d, in mpi_sub_hlp()
1237 const mbedtls_mpi_uint *l, in mpi_sub_hlp()
1238 const mbedtls_mpi_uint *r ) in mpi_sub_hlp()
1241 mbedtls_mpi_uint c = 0, t, z; in mpi_sub_hlp()
1259 mbedtls_mpi_uint carry; in mbedtls_mpi_sub_abs()
1383 mbedtls_mpi_uint p[1]; in mbedtls_mpi_add_int()
1401 mbedtls_mpi_uint p[1]; in mbedtls_mpi_sub_int()
1438 const mbedtls_mpi_uint *s, in mpi_mul_hlp()
1439 mbedtls_mpi_uint *d, in mpi_mul_hlp()
1440 mbedtls_mpi_uint b ) in mpi_mul_hlp()
1442 mbedtls_mpi_uint c = 0, t = 0; in mpi_mul_hlp()
1556 int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b ) in mbedtls_mpi_mul_int()
1595 static mbedtls_mpi_uint mbedtls_int_div_int( mbedtls_mpi_uint u1, in mbedtls_int_div_int()
1596 mbedtls_mpi_uint u0, mbedtls_mpi_uint d, mbedtls_mpi_uint *r ) in mbedtls_int_div_int()
1601 const mbedtls_mpi_uint radix = (mbedtls_mpi_uint) 1 << biH; in mbedtls_int_div_int()
1602 const mbedtls_mpi_uint uint_halfword_mask = ( (mbedtls_mpi_uint) 1 << biH ) - 1; in mbedtls_int_div_int()
1603 mbedtls_mpi_uint d0, d1, q0, q1, rAX, r0, quotient; in mbedtls_int_div_int()
1604 mbedtls_mpi_uint u0_msw, u0_lsw; in mbedtls_int_div_int()
1626 *r = (mbedtls_mpi_uint)( dividend - (quotient * d ) ); in mbedtls_int_div_int()
1628 return (mbedtls_mpi_uint) quotient; in mbedtls_int_div_int()
1696 mbedtls_mpi_uint TP2[3]; in mbedtls_mpi_div_mpi()
1823 mbedtls_mpi_uint p[1]; in mbedtls_mpi_div_int()
1863 int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b ) in mbedtls_mpi_mod_int()
1866 mbedtls_mpi_uint x, y, z; in mbedtls_mpi_mod_int()
1922 static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N ) in mpi_montg_init()
1924 mbedtls_mpi_uint x, m0 = N->p[0]; in mpi_montg_init()
1936 void mbedtls_mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N ) in mbedtls_mpi_montg_init()
1963 … void mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_uint mm, in mpi_montmul()
1967 mbedtls_mpi_uint u0, u1, *d; in mpi_montmul()
2010 …edtls_mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_uint mm, in mbedtls_mpi_montmul()
2022 mbedtls_mpi_uint mm, const mbedtls_mpi *T ) in mpi_montred()
2024 mbedtls_mpi_uint z = 1; in mpi_montred()
2034 mbedtls_mpi_uint mm, const mbedtls_mpi *T ) in mbedtls_mpi_montred()
2079 mbedtls_mpi_uint ei, mm, state; in mbedtls_mpi_exp_mod()
2228 bufsize = sizeof( mbedtls_mpi_uint ) << 3; in mbedtls_mpi_exp_mod()
2702 mbedtls_mpi_uint r; in mpi_check_small_factors()
2761 A.p[A.n - 1] &= ( (mbedtls_mpi_uint) 1 << ( k - ( A.n - 1 ) * biL - 1 ) ) - 1; in mpi_miller_rabin()
2890 mbedtls_mpi_uint r; in mbedtls_mpi_gen_prime()