Searched refs:DIGIT_BIT (Results 1 - 25 of 46) sorted by relevance

12

/netbsd-6-1-5-RELEASE/crypto/external/bsd/heimdal/dist/lib/hcrypto/libtommath/
H A Dbn_mp_2expt.c34 if ((res = mp_grow (a, b / DIGIT_BIT + 1)) != MP_OKAY) {
39 a->used = b / DIGIT_BIT + 1;
42 a->dp[b / DIGIT_BIT] = ((mp_digit)1) << (b % DIGIT_BIT);
H A Dbn_mp_get_int.c31 i = MIN(a->used,(int)((sizeof(unsigned long)*CHAR_BIT+DIGIT_BIT-1)/DIGIT_BIT))-1;
37 res = (res << DIGIT_BIT) | DIGIT(a,i);
H A Dbn_mp_mod_2d.c33 if (b >= (int) (a->used * DIGIT_BIT)) {
44 for (x = (b / DIGIT_BIT) + ((b % DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) {
48 c->dp[b / DIGIT_BIT] &=
49 (mp_digit) ((((mp_digit) 1) << (((mp_digit) b) % DIGIT_BIT)) - ((mp_digit) 1));
H A Dbn_mp_montgomery_calc_normalization.c31 bits = mp_count_bits (b) % DIGIT_BIT;
34 if ((res = mp_2expt (a, (b->used - 1) * DIGIT_BIT + bits - 1)) != MP_OKAY) {
44 for (x = bits - 1; x < (int)DIGIT_BIT; x++) {
H A Dbn_mp_dr_setup.c23 /* the casts are required if DIGIT_BIT is one less than
24 * the number of bits in a mp_digit [e.g. DIGIT_BIT==31]
26 *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) -
H A Dbn_mp_mul_2d.c33 if (c->alloc < (int)(c->used + b/DIGIT_BIT + 1)) {
34 if ((res = mp_grow (c, c->used + b / DIGIT_BIT + 1)) != MP_OKAY) {
40 if (b >= (int)DIGIT_BIT) {
41 if ((res = mp_lshd (c, b / DIGIT_BIT)) != MP_OKAY) {
46 /* shift any bit count < DIGIT_BIT */
47 d = (mp_digit) (b % DIGIT_BIT);
56 shift = DIGIT_BIT - d;
H A Dbn_mp_expt_d.c33 for (x = 0; x < (int) DIGIT_BIT; x++) {
41 if ((b & (mp_digit) (((mp_digit)1) << (DIGIT_BIT - 1))) != 0) {
H A Dbn_mp_count_bits.c33 r = (a->used - 1) * DIGIT_BIT;
H A Dbn_mp_div_2d.c56 if (b >= (int)DIGIT_BIT) {
57 mp_rshd (c, b / DIGIT_BIT);
60 /* shift any bit count < DIGIT_BIT */
61 D = (mp_digit) (b % DIGIT_BIT);
69 shift = DIGIT_BIT - D;
H A Dbn_mp_reduce_setup.c27 if ((res = mp_2expt (a, b->used * 2 * DIGIT_BIT)) != MP_OKAY) {
H A Dbn_mp_cnt_lsb.c38 x *= DIGIT_BIT;
H A Dbn_mp_reduce_is_2k.c36 for (ix = DIGIT_BIT; ix < iy; ix++) {
H A Dbn_mp_div_3.c29 /* b = 2**DIGIT_BIT / 3 */
30 b = (((mp_word)1) << ((mp_word)DIGIT_BIT)) / ((mp_word)3);
40 w = (w << ((mp_word)DIGIT_BIT)) | ((mp_word)a->dp[ix]);
44 t = (w * ((mp_word)b)) >> ((mp_word)DIGIT_BIT);
H A Dbn_mp_montgomery_reduce.c36 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
81 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
92 u = *tmpx >> DIGIT_BIT;
H A Dbn_s_mp_sqr.c46 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
67 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
73 u = (mp_digit)(r >> ((mp_word) DIGIT_BIT));
H A Dbn_mp_montgomery_setup.c53 *rho = (unsigned long)(((mp_word)1 << ((mp_word) DIGIT_BIT)) - x) & MP_MASK;
H A Dbn_mp_sqr.c43 (1 << (sizeof(mp_word) * CHAR_BIT - 2*DIGIT_BIT - 1))) {
H A Dbn_mp_add_d.c69 mu = *tmpc >> DIGIT_BIT;
75 mu = *tmpc >> DIGIT_BIT;
H A Dbn_mp_reduce.c38 if (((unsigned long) um) > (((mp_digit)1) << (DIGIT_BIT - 1))) {
63 if ((res = mp_mod_2d (x, DIGIT_BIT * (um + 1), x)) != MP_OKAY) {
H A Dbn_s_mp_add.c73 u = *tmpc >> ((mp_digit)DIGIT_BIT);
88 u = *tmpc >> ((mp_digit)DIGIT_BIT);
H A Dbn_s_mp_mul_digs.c35 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
74 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT));
H A Dbn_s_mp_mul_high_digs.c35 && MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
70 u = (mp_digit) (r >> ((mp_word) DIGIT_BIT));
H A Dbn_mp_div_2.c50 *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1));
H A Dbn_mp_mul.c50 (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
/netbsd-6-1-5-RELEASE/crypto/external/bsd/heimdal/dist/lib/hcrypto/libtommath/etc/
H A Ddrprime.c6 int sizes[] = { 1+256/DIGIT_BIT, 1+512/DIGIT_BIT, 1+768/DIGIT_BIT, 1+1024/DIGIT_BIT, 1+2048/DIGIT_BIT, 1+4096/DIGIT_BIT };
20 printf("Seeking a %d-bit safe prime\n", sizes[x] * DIGIT_BIT);

Completed in 178 milliseconds

12