Home
last modified time | relevance | path

Searched refs:mp_int (Results 1 – 3 of 3) sorted by relevance

/freebsd/contrib/wpa/src/tls/
H A Dbignum.c32 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()
[all …]
H A Dlibtommath.c121 } mp_int; typedef
132 static int s_mp_exptmod(mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
133 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
134 static int s_mp_sqr(mp_int * a, mp_int * b);
135 static int s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs);
138 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
142 static int mp_init_multi(mp_int *mp, ...);
145 static void mp_clear_multi(mp_int *mp, ...);
147 static int mp_lshd(mp_int * a, int b);
148 static void mp_set(mp_int * a, mp_digit b);
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_wolfssl.c1307 mp_int *a; in crypto_bignum_init()
1324 mp_int *a; in crypto_bignum_init_set()
1329 a = (mp_int *) crypto_bignum_init(); in crypto_bignum_init_set()
1344 mp_int *a; in crypto_bignum_init_uint()
1349 a = (mp_int *) crypto_bignum_init(); in crypto_bignum_init_uint()
1368 mp_forcezero((mp_int *) n); in crypto_bignum_deinit()
1369 mp_clear((mp_int *) n); in crypto_bignum_deinit()
1370 os_free((mp_int *) n); in crypto_bignum_deinit()
1385 num_bytes = (mp_count_bits((mp_int *) a) + 7) / 8; in crypto_bignum_to_bin()
1394 mp_to_unsigned_bin((mp_int *) a, buf + offset); in crypto_bignum_to_bin()
[all …]