/external/dropbear/libtommath/ |
bn_mp_prime_is_prime.c | 42 return MP_OKAY; 47 if ((err = mp_prime_is_divisible (a, &res)) != MP_OKAY) { 53 return MP_OKAY; 57 if ((err = mp_init (&b)) != MP_OKAY) { 65 if ((err = mp_prime_miller_rabin (a, &b, &res)) != MP_OKAY) {
|
bn_mp_radix_size.c | 30 return MP_OKAY; 40 return MP_OKAY; 52 if ((res = mp_init_copy (&t, a)) != MP_OKAY) { 61 if ((res = mp_div_d (&t, (mp_digit) radix, &t, &d)) != MP_OKAY) { 71 return MP_OKAY;
|
bn_mp_gcd.c | 33 if ((res = mp_init_copy (&u, a)) != MP_OKAY) { 37 if ((res = mp_init_copy (&v, b)) != MP_OKAY) { 51 if ((res = mp_div_2d(&u, k, &u, NULL)) != MP_OKAY) { 55 if ((res = mp_div_2d(&v, k, &v, NULL)) != MP_OKAY) { 62 if ((res = mp_div_2d(&u, u_lsb - k, &u, NULL)) != MP_OKAY) { 68 if ((res = mp_div_2d(&v, v_lsb - k, &v, NULL)) != MP_OKAY) { 81 if ((res = s_mp_sub(&v, &u, &v)) != MP_OKAY) { 86 if ((res = mp_div_2d(&v, mp_cnt_lsb(&v), &v, NULL)) != MP_OKAY) { 92 if ((res = mp_mul_2d (&u, k, c)) != MP_OKAY) { 96 res = MP_OKAY; [all...] |
bn_mp_prime_miller_rabin.c | 39 if ((err = mp_init_copy (&n1, a)) != MP_OKAY) { 42 if ((err = mp_sub_d (&n1, 1, &n1)) != MP_OKAY) { 47 if ((err = mp_init_copy (&r, &n1)) != MP_OKAY) { 57 if ((err = mp_div_2d (&r, s, &r, NULL)) != MP_OKAY) { 62 if ((err = mp_init (&y)) != MP_OKAY) { 65 if ((err = mp_exptmod (b, &r, a, &y)) != MP_OKAY) { 74 if ((err = mp_sqrmod (&y, a, &y)) != MP_OKAY) {
|
bn_mp_copy.c | 26 return MP_OKAY; 31 if ((res = mp_grow (b, a->used)) != MP_OKAY) { 62 return MP_OKAY;
|
bn_mp_fwrite.c | 23 if ((err = mp_radix_size(a, radix, &len)) != MP_OKAY) { 32 if ((err = mp_toradix(a, buf, radix)) != MP_OKAY) { 45 return MP_OKAY;
|
bn_mp_mod.c | 25 if ((res = mp_init (&t)) != MP_OKAY) { 29 if ((res = mp_div (a, b, NULL, &t)) != MP_OKAY) { 37 res = MP_OKAY;
|
bn_mp_mod_2d.c | 27 return MP_OKAY; 37 if ((res = mp_copy (a, c)) != MP_OKAY) { 49 return MP_OKAY;
|
bn_mp_prime_fermat.c | 40 if ((err = mp_init (&t)) != MP_OKAY) { 45 if ((err = mp_exptmod (b, a, a, &t)) != MP_OKAY) { 54 err = MP_OKAY;
|
bn_mp_read_unsigned_bin.c | 25 if ((res = mp_grow(a, 2)) != MP_OKAY) { 35 if ((res = mp_mul_2d (a, 8, a)) != MP_OKAY) { 49 return MP_OKAY;
|
bn_mp_to_unsigned_bin.c | 24 if ((res = mp_init_copy (&t, a)) != MP_OKAY) { 35 if ((res = mp_div_2d (&t, 8, &t, NULL)) != MP_OKAY) { 42 return MP_OKAY;
|
bn_mp_exptmod_fast.c | 70 if ((err = mp_init(&M[1])) != MP_OKAY) { 76 if ((err = mp_init(&M[x])) != MP_OKAY) { 89 if ((err = mp_montgomery_setup (P, &mp)) != MP_OKAY) { 125 if ((err = mp_reduce_2k_setup(P, &mp)) != MP_OKAY) { 136 if ((err = mp_init (&res)) != MP_OKAY) { 150 if ((err = mp_montgomery_calc_normalization (&res, P)) != MP_OKAY) { 159 if ((err = mp_mulmod (G, &res, P, &M[1])) != MP_OKAY) { 164 if ((err = mp_mod(G, P, &M[1])) != MP_OKAY) { 170 if ((err = mp_copy (&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { 175 if ((err = mp_sqr (&M[1 << (winsize - 1)], &M[1 << (winsize - 1)])) != MP_OKAY) { [all...] |
bn_mp_init_copy.c | 23 if ((res = mp_init (a)) != MP_OKAY) {
|
bn_mp_init_set.c | 22 if ((err = mp_init(a)) != MP_OKAY) {
|
bn_mp_init_set_int.c | 22 if ((err = mp_init(a)) != MP_OKAY) {
|
bn_mp_lcm.c | 25 if ((res = mp_init_multi (&t1, &t2, NULL)) != MP_OKAY) { 30 if ((res = mp_gcd (a, b, &t1)) != MP_OKAY) { 37 if ((res = mp_div(a, &t1, &t2, NULL)) != MP_OKAY) { 43 if ((res = mp_div(b, &t1, &t2, NULL)) != MP_OKAY) {
|
bn_mp_reduce_2k.c | 24 if ((res = mp_init(&q)) != MP_OKAY) { 31 if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { 37 if ((res = mp_mul_d(&q, d, &q)) != MP_OKAY) { 43 if ((res = s_mp_add(a, &q, a)) != MP_OKAY) {
|
bn_mp_reduce_2k_l.c | 27 if ((res = mp_init(&q)) != MP_OKAY) { 34 if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { 39 if ((res = mp_mul(&q, d, &q)) != MP_OKAY) { 44 if ((res = s_mp_add(a, &q, a)) != MP_OKAY) {
|
bn_mp_toradix.c | 35 return MP_OKAY; 38 if ((res = mp_init_copy (&t, a)) != MP_OKAY) { 51 if ((res = mp_div_d (&t, (mp_digit) radix, &t, &d)) != MP_OKAY) { 68 return MP_OKAY;
|
bn_mp_toradix_n.c | 38 return MP_OKAY; 41 if ((res = mp_init_copy (&t, a)) != MP_OKAY) { 64 if ((res = mp_div_d (&t, (mp_digit) radix, &t, &d)) != MP_OKAY) { 81 return MP_OKAY;
|
bn_mp_addmod.c | 25 if ((res = mp_init (&t)) != MP_OKAY) { 29 if ((res = mp_add (a, b, &t)) != MP_OKAY) {
|
bn_mp_mulmod.c | 24 if ((res = mp_init (&t)) != MP_OKAY) { 28 if ((res = mp_mul (a, b, &t)) != MP_OKAY) {
|
bn_mp_prime_random_ex.c | 90 if ((err = mp_read_unsigned_bin(a, tmp, bsize)) != MP_OKAY) { goto error; } 93 if ((err = mp_prime_is_prime(a, t, &res)) != MP_OKAY) { goto error; } 100 if ((err = mp_sub_d(a, 1, a)) != MP_OKAY) { goto error; } 101 if ((err = mp_div_2(a, a)) != MP_OKAY) { goto error; } 104 if ((err = mp_prime_is_prime(a, t, &res)) != MP_OKAY) { goto error; } 110 if ((err = mp_mul_2(a, a)) != MP_OKAY) { goto error; } 111 if ((err = mp_add_d(a, 1, a)) != MP_OKAY) { goto error; } 114 err = MP_OKAY;
|
/external/dropbear/libtommath/etc/ |
mersenne.c | 16 if ((res = mp_init (&n)) != MP_OKAY) { 20 if ((res = mp_init (&u)) != MP_OKAY) { 25 if ((res = mp_2expt(&n, s)) != MP_OKAY) { 28 if ((res = mp_sub_d (&n, 1, &n)) != MP_OKAY) { 38 if ((res = mp_sqr (&u, &u)) != MP_OKAY) { 41 if ((res = mp_sub_d (&u, 2, &u)) != MP_OKAY) { 47 if ((res = mp_add (&u, &n, &u)) != MP_OKAY) { 53 if ((res = mp_reduce_2k (&u, &n, 1)) != MP_OKAY) { 64 res = MP_OKAY; 118 if (is_mersenne (k, &pp) != MP_OKAY) { [all...] |
/external/dropbear/libtommath/pre_gen/ |
mpi.c | 23 { MP_OKAY, "Successful" }, 87 if ((res = mp_init_multi(&x, &y, &u, &v, &B, &D, NULL)) != MP_OKAY) { 92 if ((res = mp_copy (b, &x)) != MP_OKAY) { 97 if ((res = mp_mod (a, b, &y)) != MP_OKAY) { 102 if ((res = mp_copy (&x, &u)) != MP_OKAY) { 105 if ((res = mp_copy (&y, &v)) != MP_OKAY) { 114 if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { 119 if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { 124 if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { 132 if ((res = mp_div_2 (&v, &v)) != MP_OKAY) { [all...] |