/netbsd-6-1-5-RELEASE/crypto/external/bsd/heimdal/dist/lib/hcrypto/libtommath/ |
H A D | bn_mp_toom_mul.c | 35 &b2, &tmp1, &tmp2, NULL)) != MP_OKAY) { 43 if ((res = mp_mod_2d(a, DIGIT_BIT * B, &a0)) != MP_OKAY) { 47 if ((res = mp_copy(a, &a1)) != MP_OKAY) { 53 if ((res = mp_copy(a, &a2)) != MP_OKAY) { 59 if ((res = mp_mod_2d(b, DIGIT_BIT * B, &b0)) != MP_OKAY) { 63 if ((res = mp_copy(b, &b1)) != MP_OKAY) { 69 if ((res = mp_copy(b, &b2)) != MP_OKAY) { 75 if ((res = mp_mul(&a0, &b0, &w0)) != MP_OKAY) { 80 if ((res = mp_mul(&a2, &b2, &w4)) != MP_OKAY) { 85 if ((res = mp_mul_2(&a0, &tmp1)) != MP_OKAY) { [all...] |
H A D | bn_mp_to_signed_bin.c | 25 if ((res = mp_to_unsigned_bin (a, b + 1)) != MP_OKAY) { 29 return MP_OKAY;
|
H A D | bn_mp_prime_is_divisible.c | 35 if ((err = mp_mod_d (a, ltm_prime_tab[ix], &res)) != MP_OKAY) { 42 return MP_OKAY; 46 return MP_OKAY;
|
H A D | bn_mp_toom_sqr.c | 28 if ((res = mp_init_multi(&w0, &w1, &w2, &w3, &w4, &a0, &a1, &a2, &tmp1, NULL)) != MP_OKAY) { 36 if ((res = mp_mod_2d(a, DIGIT_BIT * B, &a0)) != MP_OKAY) { 40 if ((res = mp_copy(a, &a1)) != MP_OKAY) { 46 if ((res = mp_copy(a, &a2)) != MP_OKAY) { 52 if ((res = mp_sqr(&a0, &w0)) != MP_OKAY) { 57 if ((res = mp_sqr(&a2, &w4)) != MP_OKAY) { 62 if ((res = mp_mul_2(&a0, &tmp1)) != MP_OKAY) { 65 if ((res = mp_add(&tmp1, &a1, &tmp1)) != MP_OKAY) { 68 if ((res = mp_mul_2(&tmp1, &tmp1)) != MP_OKAY) { 71 if ((res = mp_add(&tmp1, &a2, &tmp1)) != MP_OKAY) { [all...] |
H A D | bn_mp_rand.c | 29 return MP_OKAY; 37 if ((res = mp_add_d (a, d, a)) != MP_OKAY) { 42 if ((res = mp_lshd (a, 1)) != MP_OKAY) { 46 if ((res = mp_add_d (a, ((mp_digit) abs (rand ())), a)) != MP_OKAY) { 51 return MP_OKAY;
|
H A D | bn_mp_karatsuba_mul.c | 64 if (mp_init_size (&x0, B) != MP_OKAY) 66 if (mp_init_size (&x1, a->used - B) != MP_OKAY) 68 if (mp_init_size (&y0, B) != MP_OKAY) 70 if (mp_init_size (&y1, b->used - B) != MP_OKAY) 74 if (mp_init_size (&t1, B * 2) != MP_OKAY) 76 if (mp_init_size (&x0y0, B * 2) != MP_OKAY) 78 if (mp_init_size (&x1y1, B * 2) != MP_OKAY) 122 if (mp_mul (&x0, &y0, &x0y0) != MP_OKAY) 124 if (mp_mul (&x1, &y1, &x1y1) != MP_OKAY) 128 if (s_mp_add (&x1, &x0, &t1) != MP_OKAY) [all...] |
H A D | bn_mp_reduce.c | 30 if ((res = mp_init_copy (&q, x)) != MP_OKAY) { 39 if ((res = mp_mul (&q, mu, &q)) != MP_OKAY) { 44 if ((res = s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { 48 if ((res = fast_s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { 63 if ((res = mp_mod_2d (x, DIGIT_BIT * (um + 1), x)) != MP_OKAY) { 68 if ((res = s_mp_mul_digs (&q, m, &q, um + 1)) != MP_OKAY) { 73 if ((res = mp_sub (x, &q, x)) != MP_OKAY) { 80 if ((res = mp_lshd (&q, um + 1)) != MP_OKAY) 82 if ((res = mp_add (x, &q, x)) != MP_OKAY) 88 if ((res = s_mp_sub (x, m, x)) != MP_OKAY) { [all...] |
H A D | bn_mp_n_root.c | 40 if ((res = mp_init (&t1)) != MP_OKAY) { 44 if ((res = mp_init (&t2)) != MP_OKAY) { 48 if ((res = mp_init (&t3)) != MP_OKAY) { 61 if ((res = mp_copy (&t2, &t1)) != MP_OKAY) { 68 if ((res = mp_expt_d (&t1, b - 1, &t3)) != MP_OKAY) { 74 if ((res = mp_mul (&t3, &t1, &t2)) != MP_OKAY) { 79 if ((res = mp_sub (&t2, a, &t2)) != MP_OKAY) { 85 if ((res = mp_mul_d (&t3, b, &t3)) != MP_OKAY) { 90 if ((res = mp_div (&t2, &t3, &t3, NULL)) != MP_OKAY) { 94 if ((res = mp_sub (&t1, &t3, &t2)) != MP_OKAY) { [all...] |
H A D | bn_fast_mp_invmod.c | 37 if ((res = mp_init_multi(&x, &y, &u, &v, &B, &D, NULL)) != MP_OKAY) { 42 if ((res = mp_copy (b, &x)) != MP_OKAY) { 47 if ((res = mp_mod (a, b, &y)) != MP_OKAY) { 52 if ((res = mp_copy (&x, &u)) != MP_OKAY) { 55 if ((res = mp_copy (&y, &v)) != MP_OKAY) { 64 if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { 69 if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { 74 if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { 82 if ((res = mp_div_2 (&v, &v)) != MP_OKAY) { 88 if ((res = mp_sub (&D, &x, &D)) != MP_OKAY) { [all...] |
H A D | bn_mp_exteuclid.c | 28 if ((err = mp_init_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL)) != MP_OKAY) { 34 if ((err = mp_copy(a, &u3)) != MP_OKAY) { goto _ERR; } 38 if ((err = mp_copy(b, &v3)) != MP_OKAY) { goto _ERR; } 43 if ((err = mp_div(&u3, &v3, &q, NULL)) != MP_OKAY) { goto _ERR; } 46 if ((err = mp_mul(&v1, &q, &tmp)) != MP_OKAY) { goto _ERR; } 47 if ((err = mp_sub(&u1, &tmp, &t1)) != MP_OKAY) { goto _ERR; } 48 if ((err = mp_mul(&v2, &q, &tmp)) != MP_OKAY) { goto _ERR; } 49 if ((err = mp_sub(&u2, &tmp, &t2)) != MP_OKAY) { goto _ERR; } 50 if ((err = mp_mul(&v3, &q, &tmp)) != MP_OKAY) { goto _ERR; } 51 if ((err = mp_sub(&u3, &tmp, &t3)) != MP_OKAY) { got [all...] |
H A D | bn_mp_karatsuba_sqr.c | 41 if (mp_init_size (&x0, B) != MP_OKAY) 43 if (mp_init_size (&x1, a->used - B) != MP_OKAY) 47 if (mp_init_size (&t1, a->used * 2) != MP_OKAY) 49 if (mp_init_size (&t2, a->used * 2) != MP_OKAY) 51 if (mp_init_size (&x0x0, B * 2) != MP_OKAY) 53 if (mp_init_size (&x1x1, (a->used - B) * 2) != MP_OKAY) 80 if (mp_sqr (&x0, &x0x0) != MP_OKAY) 82 if (mp_sqr (&x1, &x1x1) != MP_OKAY) 86 if (s_mp_add (&x1, &x0, &t1) != MP_OKAY) 88 if (mp_sqr (&t1, &t1) != MP_OKAY) [all...] |
H A D | bn_mp_invmod_slow.c | 33 &A, &B, &C, &D, NULL)) != MP_OKAY) { 38 if ((res = mp_mod(a, b, &x)) != MP_OKAY) { 41 if ((res = mp_copy (b, &y)) != MP_OKAY) { 52 if ((res = mp_copy (&x, &u)) != MP_OKAY) { 55 if ((res = mp_copy (&y, &v)) != MP_OKAY) { 65 if ((res = mp_div_2 (&u, &u)) != MP_OKAY) { 71 if ((res = mp_add (&A, &y, &A)) != MP_OKAY) { 74 if ((res = mp_sub (&B, &x, &B)) != MP_OKAY) { 79 if ((res = mp_div_2 (&A, &A)) != MP_OKAY) { 82 if ((res = mp_div_2 (&B, &B)) != MP_OKAY) { [all...] |
H A D | bn_mp_reduce_2k_setup_l.c | 26 if ((res = mp_init(&tmp)) != MP_OKAY) { 30 if ((res = mp_2expt(&tmp, mp_count_bits(a))) != MP_OKAY) { 34 if ((res = s_mp_sub(&tmp, a, d)) != MP_OKAY) {
|
H A D | bn_mp_expt_d.c | 26 if ((res = mp_init_copy (&g, a)) != MP_OKAY) { 35 if ((res = mp_sqr (c, c)) != MP_OKAY) { 42 if ((res = mp_mul (c, &g, c)) != MP_OKAY) { 53 return MP_OKAY;
|
H A D | bn_mp_montgomery_calc_normalization.c | 34 if ((res = mp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1)) != MP_OKAY) { 45 if ((res = mp_mul_2 (a, a)) != MP_OKAY) { 49 if ((res = s_mp_sub (a, b, a)) != MP_OKAY) { 55 return MP_OKAY;
|
H A D | bn_mp_reduce_2k_setup.c | 26 if ((res = mp_init(&tmp)) != MP_OKAY) { 31 if ((res = mp_2expt(&tmp, p)) != MP_OKAY) { 36 if ((res = s_mp_sub(&tmp, a, &tmp)) != MP_OKAY) { 43 return MP_OKAY;
|
H A D | bn_mp_sqrt.c | 34 return MP_OKAY; 37 if ((res = mp_init_copy(&t1, arg)) != MP_OKAY) { 41 if ((res = mp_init(&t2)) != MP_OKAY) { 49 if ((res = mp_div(arg,&t1,&t2,NULL)) != MP_OKAY) { 52 if ((res = mp_add(&t1,&t2,&t1)) != MP_OKAY) { 55 if ((res = mp_div_2(&t1,&t1)) != MP_OKAY) { 60 if ((res = mp_div(arg,&t1,&t2,NULL)) != MP_OKAY) { 63 if ((res = mp_add(&t1,&t2,&t1)) != MP_OKAY) { 66 if ((res = mp_div_2(&t1,&t1)) != MP_OKAY) {
|
H A D | bn_s_mp_exptmod.c | 58 if ((err = mp_init(&M[1])) != MP_OKAY) { 64 if ((err = mp_init(&M[x])) != MP_OKAY) { 74 if ((err = mp_init (&mu)) != MP_OKAY) { 79 if ((err = mp_reduce_setup (&mu, P)) != MP_OKAY) { 84 if ((err = mp_reduce_2k_setup_l (P, &mu)) != MP_OKAY) { 98 if ((err = mp_mod (G, P, &M[1])) != MP_OKAY) { 105 if ((err = mp_copy (&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { 112 &M[1 << (winsize - 1)])) != MP_OKAY) { 117 if ((err = redux (&M[1 << (winsize - 1)], P, &mu)) != MP_OKAY) { 126 if ((err = mp_mul (&M[x - 1], &M[1], &M[x])) != MP_OKAY) { [all...] |
H A D | bn_mp_2expt.c | 34 if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) { 44 return MP_OKAY;
|
H A D | bn_mp_abs.c | 31 if ((res = mp_copy (a, b)) != MP_OKAY) { 39 return MP_OKAY;
|
H A D | bn_mp_is_square.c | 59 return MP_OKAY; 64 return MP_OKAY; 68 if ((res = mp_mod_d(arg,105,&c)) != MP_OKAY) { 72 return MP_OKAY; 76 if ((res = mp_init_set_int(&t,11L*13L*17L*19L*23L*29L*31L)) != MP_OKAY) { 79 if ((res = mp_mod(arg,&t,&t)) != MP_OKAY) { 85 * is already equal to MP_OKAY from the mp_mod call 96 if ((res = mp_sqrt(arg,&t)) != MP_OKAY) { 99 if ((res = mp_sqr(&t,&t)) != MP_OKAY) {
|
H A D | bn_mp_jacobi.c | 37 return MP_OKAY; 43 return MP_OKAY; 50 if ((res = mp_init_copy (&a1, a)) != MP_OKAY) { 54 if ((res = mp_init (&p1)) != MP_OKAY) { 60 if ((res = mp_div_2d(&a1, k, &a1, NULL)) != MP_OKAY) { 88 if ((res = mp_mod (p, &a1, &p1)) != MP_OKAY) { 91 if ((res = mp_jacobi (&p1, &a1, &r)) != MP_OKAY) { 98 res = MP_OKAY;
|
H A D | bn_mp_neg.c | 25 if ((res = mp_copy (a, b)) != MP_OKAY) { 36 return MP_OKAY;
|
H A D | bn_mp_read_signed_bin.c | 26 if ((res = mp_read_unsigned_bin (a, b + 1, c - 1)) != MP_OKAY) { 37 return MP_OKAY;
|
H A D | bn_mp_set_int.c | 30 if ((res = mp_mul_2d (a, 4, a)) != MP_OKAY) { 44 return MP_OKAY;
|