Lines Matching refs:mbedtls_mpi
86 void mbedtls_mpi_init( mbedtls_mpi *X ) in mbedtls_mpi_init()
98 void mbedtls_mpi_free( mbedtls_mpi *X ) in mbedtls_mpi_free()
117 int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ) in mbedtls_mpi_grow()
148 int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ) in mbedtls_mpi_shrink()
187 static int mbedtls_mpi_resize_clear( mbedtls_mpi *X, size_t limbs ) in mbedtls_mpi_resize_clear()
216 int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ) in mbedtls_mpi_copy()
262 void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ) in mbedtls_mpi_swap()
264 mbedtls_mpi T; in mbedtls_mpi_swap()
268 memcpy( &T, X, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap()
269 memcpy( X, Y, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap()
270 memcpy( Y, &T, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap()
276 int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z ) in mbedtls_mpi_lset()
295 int mbedtls_mpi_get_bit( const mbedtls_mpi *X, size_t pos ) in mbedtls_mpi_get_bit()
312 int mbedtls_mpi_set_bit( mbedtls_mpi *X, size_t pos, unsigned char val ) in mbedtls_mpi_set_bit()
341 size_t mbedtls_mpi_lsb( const mbedtls_mpi *X ) in mbedtls_mpi_lsb()
375 size_t mbedtls_mpi_bitlen( const mbedtls_mpi *X ) in mbedtls_mpi_bitlen()
394 size_t mbedtls_mpi_size( const mbedtls_mpi *X ) in mbedtls_mpi_size()
419 int mbedtls_mpi_read_string( mbedtls_mpi *X, int radix, const char *s ) in mbedtls_mpi_read_string()
425 mbedtls_mpi T; in mbedtls_mpi_read_string()
489 static int mpi_write_hlp( mbedtls_mpi *X, int radix, in mpi_write_hlp()
528 int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix, in mbedtls_mpi_write_string()
534 mbedtls_mpi T; in mbedtls_mpi_write_string()
616 int mbedtls_mpi_read_file( mbedtls_mpi *X, int radix, FILE *fin ) in mbedtls_mpi_read_file()
655 int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X, int radix, FILE *fout ) in mbedtls_mpi_write_file()
789 int mbedtls_mpi_read_binary_le( mbedtls_mpi *X, in mbedtls_mpi_read_binary_le()
815 int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen ) in mbedtls_mpi_read_binary()
851 int mbedtls_mpi_write_binary_le( const mbedtls_mpi *X, in mbedtls_mpi_write_binary_le()
890 int mbedtls_mpi_write_binary( const mbedtls_mpi *X, in mbedtls_mpi_write_binary()
936 int mbedtls_mpi_shift_l( mbedtls_mpi *X, size_t count ) in mbedtls_mpi_shift_l()
987 int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count ) in mbedtls_mpi_shift_r()
1031 int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y ) in mbedtls_mpi_cmp_abs()
1063 int mbedtls_mpi_cmp_mpi( const mbedtls_mpi *X, const mbedtls_mpi *Y ) in mbedtls_mpi_cmp_mpi()
1098 int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z ) in mbedtls_mpi_cmp_int()
1100 mbedtls_mpi Y; in mbedtls_mpi_cmp_int()
1115 int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_add_abs()
1126 const mbedtls_mpi *T = A; A = X; B = T; in mbedtls_mpi_add_abs()
1208 int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_sub_abs()
1263 int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_add_mpi()
1298 int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_sub_mpi()
1333 int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b ) in mbedtls_mpi_add_int()
1335 mbedtls_mpi B; in mbedtls_mpi_add_int()
1351 int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint b ) in mbedtls_mpi_sub_int()
1353 mbedtls_mpi B; in mbedtls_mpi_sub_int()
1457 int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_mul_mpi()
1461 mbedtls_mpi TA, TB; in mbedtls_mpi_mul_mpi()
1509 int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint b ) in mbedtls_mpi_mul_int()
1643 int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, in mbedtls_mpi_div_mpi()
1644 const mbedtls_mpi *B ) in mbedtls_mpi_div_mpi()
1648 mbedtls_mpi X, Y, Z, T1, T2; in mbedtls_mpi_div_mpi()
1771 int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, in mbedtls_mpi_div_int()
1772 const mbedtls_mpi *A, in mbedtls_mpi_div_int()
1775 mbedtls_mpi B; in mbedtls_mpi_div_int()
1790 int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_mod_mpi()
1816 int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_sint b ) in mbedtls_mpi_mod_int()
1875 static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N ) in mpi_montg_init()
1911 static void mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_ui… in mpi_montmul()
1912 const mbedtls_mpi *T ) in mpi_montmul()
1963 static void mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, in mpi_montred()
1964 mbedtls_mpi_uint mm, const mbedtls_mpi *T ) in mpi_montred()
1967 mbedtls_mpi U; in mpi_montred()
1990 static int mpi_select( mbedtls_mpi *R, const mbedtls_mpi *T, size_t T_size, size_t idx ) in mpi_select()
2007 int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A, in mbedtls_mpi_exp_mod()
2008 const mbedtls_mpi *E, const mbedtls_mpi *N, in mbedtls_mpi_exp_mod()
2009 mbedtls_mpi *prec_RR ) in mbedtls_mpi_exp_mod()
2016 mbedtls_mpi RR, T, W[ 1 << MBEDTLS_MPI_WINDOW_SIZE ], WW, Apos; in mbedtls_mpi_exp_mod()
2084 memcpy( prec_RR, &RR, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_exp_mod()
2087 memcpy( &RR, prec_RR, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_exp_mod()
2244 int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A, const mbedtls_mpi *B ) in mbedtls_mpi_gcd()
2248 mbedtls_mpi TA, TB; in mbedtls_mpi_gcd()
2363 mbedtls_mpi *X, size_t n_bytes, in mpi_fill_random_internal()
2389 int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size, in mbedtls_mpi_fill_random()
2410 int mbedtls_mpi_random( mbedtls_mpi *X, in mbedtls_mpi_random()
2412 const mbedtls_mpi *N, in mbedtls_mpi_random()
2421 mbedtls_mpi lower_bound; in mbedtls_mpi_random()
2488 int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A, const mbedtls_mpi *N ) in mbedtls_mpi_inv_mod()
2491 mbedtls_mpi G, TA, TU, U1, U2, TB, TV, V1, V2; in mbedtls_mpi_inv_mod()
2619 static int mpi_check_small_factors( const mbedtls_mpi *X ) in mpi_check_small_factors()
2646 static int mpi_miller_rabin( const mbedtls_mpi *X, size_t rounds, in mpi_miller_rabin()
2652 mbedtls_mpi W, R, T, A, RR; in mpi_miller_rabin()
2739 int mbedtls_mpi_is_prime_ext( const mbedtls_mpi *X, int rounds, in mbedtls_mpi_is_prime_ext()
2744 mbedtls_mpi XX; in mbedtls_mpi_is_prime_ext()
2777 int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags, in mbedtls_mpi_gen_prime()
2792 mbedtls_mpi Y; in mbedtls_mpi_gen_prime()
2916 mbedtls_mpi A, E, N, X, Y, U, V; in mbedtls_mpi_self_test()