Home
last modified time | relevance | path

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

1234567

/external/dropbear/libtommath/
Dtommath.h182 } mp_int; typedef
197 int mp_init(mp_int *a);
200 void mp_clear(mp_int *a);
203 int mp_init_multi(mp_int *mp, ...);
206 void mp_clear_multi(mp_int *mp, ...);
209 void mp_exch(mp_int *a, mp_int *b);
212 int mp_shrink(mp_int *a);
215 int mp_grow(mp_int *a, int size);
218 int mp_init_size(mp_int *a, int size);
226 void mp_zero(mp_int *a);
[all …]
Dbn_mp_mulmod.c19 int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_mulmod()
22 mp_int t; in mp_mulmod()
Dbn_mp_submod.c20 mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_submod()
23 mp_int t; in mp_submod()
Dbn_mp_addmod.c20 mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_addmod()
23 mp_int t; in mp_addmod()
Dbn_s_mp_exptmod.c23 int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) in s_mp_exptmod()
25 mp_int M[TAB_SIZE], res, mu; in s_mp_exptmod()
28 int (*redux)(mp_int*,mp_int*,mp_int*); in s_mp_exptmod()
Dbn_mp_sqrmod.c20 mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) in mp_sqrmod()
23 mp_int t; in mp_sqrmod()
Dbn_mp_exptmod.c24 int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) in mp_exptmod()
36 mp_int tmpG, tmpX; in mp_exptmod()
Dbn.tex343 \} mp_int;
381 int mp_init (mp_int * a);
391 mp_int number;
412 void mp_clear (mp_int * a);
422 mp_int number;
449 int mp_init_multi(mp_int *mp, ...);
460 mp_int num1, num2, num3;
485 int mp_init_copy (mp_int * a, mp_int * b);
493 mp_int num1, num2;
520 int mp_init_size (mp_int * a, int size);
[all …]
Dbn_mp_mod.c20 mp_mod (mp_int * a, mp_int * b, mp_int * c) in mp_mod()
22 mp_int t; in mp_mod()
Dbn_mp_init_multi.c19 int mp_init_multi(mp_int *mp, ...) in mp_init_multi()
23 mp_int* cur_arg = mp; in mp_init_multi()
42 cur_arg = va_arg(clean_args, mp_int*); in mp_init_multi()
49 cur_arg = va_arg(args, mp_int*); in mp_init_multi()
Dbn_mp_exteuclid.c21 int mp_exteuclid(mp_int *a, mp_int *b, mp_int *U1, mp_int *U2, mp_int *U3) in mp_exteuclid()
23 mp_int u1,u2,u3,v1,v2,v3,t1,t2,t3,q,tmp; in mp_exteuclid()
/external/dropbear/libtommath/mtest/
Dmpi.h79 } mp_int; typedef
90 mp_err mp_init(mp_int *mp);
91 mp_err mp_init_array(mp_int mp[], int count);
92 mp_err mp_init_size(mp_int *mp, mp_size prec);
93 mp_err mp_init_copy(mp_int *mp, mp_int *from);
94 mp_err mp_copy(mp_int *from, mp_int *to);
95 void mp_exch(mp_int *mp1, mp_int *mp2);
96 void mp_clear(mp_int *mp);
97 void mp_clear_array(mp_int mp[], int count);
98 void mp_zero(mp_int *mp);
[all …]
Dmpi.c160 mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */
161 mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */
163 void s_mp_clamp(mp_int *mp); /* clip leading zeroes */
165 void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */
167 mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */
168 void s_mp_rshd(mp_int *mp, mp_size p); /* right-shift by p digits */
169 void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */
170 void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */
171 mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place*/
172 void s_mp_div_2(mp_int *mp); /* divide by 2 in place */
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/tls/
Dbignum.c38 struct bignum *n = os_zalloc(sizeof(mp_int)); in bignum_init()
41 if (mp_init((mp_int *) n) != MP_OKAY) { in bignum_init()
56 mp_clear((mp_int *) n); in bignum_deinit()
69 return mp_unsigned_bin_size((mp_int *) n); in bignum_get_unsigned_bin_len()
83 size_t need = mp_unsigned_bin_size((mp_int *) n); in bignum_get_unsigned_bin()
88 if (mp_to_unsigned_bin((mp_int *) n, buf) != MP_OKAY) { in bignum_get_unsigned_bin()
107 if (mp_read_unsigned_bin((mp_int *) n, (u8 *) buf, len) != MP_OKAY) { in bignum_set_unsigned_bin()
123 return mp_cmp((mp_int *) a, (mp_int *) b); in bignum_cmp()
135 return mp_cmp_d((mp_int *) a, b); in bignum_cmp_d()
149 if (mp_add((mp_int *) a, (mp_int *) b, (mp_int *) c) != MP_OKAY) { in bignum_add()
[all …]
Dlibtommath.c118 } mp_int; typedef
129 static int s_mp_exptmod(mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
130 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
131 static int s_mp_sqr(mp_int * a, mp_int * b);
132 static int s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs);
134 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
137 static int mp_init_multi(mp_int *mp, ...);
140 static void mp_clear_multi(mp_int *mp, ...);
142 static int mp_lshd(mp_int * a, int b);
143 static void mp_set(mp_int * a, mp_digit b);
[all …]
/external/wpa_supplicant_8/src/tls/
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 …]
Dlibtommath.c118 } mp_int; typedef
129 static int s_mp_exptmod(mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode);
130 static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
131 static int s_mp_sqr(mp_int * a, mp_int * b);
132 static int s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs);
134 static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
137 static int mp_init_multi(mp_int *mp, ...);
140 static void mp_clear_multi(mp_int *mp, ...);
142 static int mp_lshd(mp_int * a, int b);
143 static void mp_set(mp_int * a, mp_digit b);
[all …]
/external/dropbear/
Dgenrsa.c36 static void getrsaprime(mp_int* prime, mp_int *primeminus,
37 mp_int* rsa_e, unsigned int size);
49 key->e = (mp_int*)m_malloc(sizeof(mp_int)); in gen_rsa_priv_key()
50 key->n = (mp_int*)m_malloc(sizeof(mp_int)); in gen_rsa_priv_key()
51 key->d = (mp_int*)m_malloc(sizeof(mp_int)); in gen_rsa_priv_key()
52 key->p = (mp_int*)m_malloc(sizeof(mp_int)); in gen_rsa_priv_key()
53 key->q = (mp_int*)m_malloc(sizeof(mp_int)); in gen_rsa_priv_key()
96 static void getrsaprime(mp_int* prime, mp_int *primeminus, in getrsaprime()
97 mp_int* rsa_e, unsigned int size) { in getrsaprime()
Dbignum.c31 void m_mp_init(mp_int *mp) { in m_mp_init()
40 void m_mp_init_multi(mp_int *mp, ...) in m_mp_init_multi()
42 mp_int* cur_arg = mp; in m_mp_init_multi()
50 cur_arg = va_arg(args, mp_int*); in m_mp_init_multi()
55 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) { in bytes_to_mp()
63 void sha1_process_mp(hash_state *hs, mp_int *mp) { in sha1_process_mp()
Dgendss.c52 key->p = (mp_int*)m_malloc(sizeof(mp_int)); in gen_dss_priv_key()
53 key->q = (mp_int*)m_malloc(sizeof(mp_int)); in gen_dss_priv_key()
54 key->g = (mp_int*)m_malloc(sizeof(mp_int)); in gen_dss_priv_key()
55 key->y = (mp_int*)m_malloc(sizeof(mp_int)); in gen_dss_priv_key()
56 key->x = (mp_int*)m_malloc(sizeof(mp_int)); in gen_dss_priv_key()
Dkex.h36 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv);
37 void kexdh_comb_key(mp_int *dh_pub_us, mp_int *dh_priv, mp_int *dh_pub_them,
Drsa.h37 mp_int* n;
38 mp_int* e;
39 mp_int* d;
40 mp_int* p;
41 mp_int* q;
Ddss.h37 mp_int* p;
38 mp_int* q;
39 mp_int* g;
40 mp_int* y;
41 mp_int* x;
Dbignum.h30 void m_mp_init(mp_int *mp);
31 void m_mp_init_multi(mp_int *mp, ...);
32 void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len);
33 void sha1_process_mp(hash_state *hs, mp_int *mp);
/external/dropbear/libtommath/pre_gen/
Dmpi.c76 int fast_mp_invmod (mp_int * a, mp_int * b, mp_int * c) in fast_mp_invmod()
78 mp_int x, y, u, v, B, D; in fast_mp_invmod()
230 int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho) in fast_mp_montgomery_reduce()
414 int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in fast_s_mp_mul_digs()
518 int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs) in fast_s_mp_mul_high_digs()
621 int fast_s_mp_sqr (mp_int * a, mp_int * b) in fast_s_mp_sqr()
735 mp_2expt (mp_int * a, int b) in mp_2expt()
786 mp_abs (mp_int * a, mp_int * b) in mp_abs()
829 int mp_add (mp_int * a, mp_int * b, mp_int * c) in mp_add()
887 mp_add_d (mp_int * a, mp_digit b, mp_int * c) in mp_add_d()
[all …]

1234567