Lines Matching refs:mp_int
32 struct bignum *n = os_zalloc(sizeof(mp_int)); in bignum_init()
35 if (mp_init((mp_int *) n) != MP_OKAY) { in bignum_init()
50 mp_clear((mp_int *) n); in bignum_deinit()
63 return mp_unsigned_bin_size((mp_int *) n); in bignum_get_unsigned_bin_len()
77 size_t need = mp_unsigned_bin_size((mp_int *) n); in bignum_get_unsigned_bin()
82 if (mp_to_unsigned_bin((mp_int *) n, buf) != MP_OKAY) { in bignum_get_unsigned_bin()
101 if (mp_read_unsigned_bin((mp_int *) n, (u8 *) buf, len) != MP_OKAY) { in bignum_set_unsigned_bin()
117 return mp_cmp((mp_int *) a, (mp_int *) b); in bignum_cmp()
129 return mp_cmp_d((mp_int *) a, b); in bignum_cmp_d()
143 if (mp_add((mp_int *) a, (mp_int *) b, (mp_int *) c) != MP_OKAY) { in bignum_add()
161 if (mp_sub((mp_int *) a, (mp_int *) b, (mp_int *) c) != MP_OKAY) { in bignum_sub()
179 if (mp_mul((mp_int *) a, (mp_int *) b, (mp_int *) c) != MP_OKAY) { in bignum_mul()
198 if (mp_mulmod((mp_int *) a, (mp_int *) b, (mp_int *) c, (mp_int *) d) in bignum_mulmod()
218 if (mp_exptmod((mp_int *) a, (mp_int *) b, (mp_int *) c, (mp_int *) d) in bignum_exptmod()