Home
last modified time | relevance | path

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

/openssl-master/crypto/bn/
A Dbn_shift.c37 c = t >> (BN_BITS2 - 1); in BN_lshift1()
68 c = t << (BN_BITS2 - 1); in BN_rshift1()
73 c = t << (BN_BITS2 - 1); in BN_rshift1()
116 nw = n / BN_BITS2; in bn_lshift_fixed_top()
121 lb = (unsigned int)n % BN_BITS2; in bn_lshift_fixed_top()
122 rb = BN_BITS2 - lb; in bn_lshift_fixed_top()
123 rb %= BN_BITS2; /* say no to undefined behaviour */ in bn_lshift_fixed_top()
185 nw = n / BN_BITS2; in bn_rshift_fixed_top()
192 rb = (unsigned int)n % BN_BITS2; in bn_rshift_fixed_top()
193 lb = BN_BITS2 - rb; in bn_rshift_fixed_top()
[all …]
A Dbn_lib.c105 #if BN_BITS2 > 32 in BN_num_bits_word()
108 mask = (0 - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
115 mask = (0 - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
691 i = n / BN_BITS2; in BN_set_bit()
692 j = n % BN_BITS2; in BN_set_bit()
715 i = n / BN_BITS2; in BN_clear_bit()
716 j = n % BN_BITS2; in BN_clear_bit()
732 i = n / BN_BITS2; in BN_is_bit_set()
733 j = n % BN_BITS2; in BN_is_bit_set()
747 w = n / BN_BITS2; in BN_mask_bits()
[all …]
A Dbn_div.c98 # if BN_BITS2 == 64 && defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16
117 BN_ULLONG R = ((BN_ULLONG)m[0] << BN_BITS2) | m[-1]; in bn_div_3_words()
118 BN_ULLONG D = ((BN_ULLONG)d0 << BN_BITS2) | d1; in bn_div_3_words()
122 for (i = 0; i < BN_BITS2; i++) { in bn_div_3_words()
131 mask = 0 - (Q >> (BN_BITS2 - 1)); /* does it overflow? */ in bn_div_3_words()
147 lshift = BN_BITS2 - rshift; in bn_left_align()
148 rshift %= BN_BITS2; /* say no to undefined behaviour */ in bn_left_align()
360 q = (BN_ULONG)(((((BN_ULLONG) n0) << BN_BITS2) | n1) / d0); in bn_div_fixed_top()
375 if (t2 <= ((((BN_ULLONG) rem) << BN_BITS2) | n2)) in bn_div_fixed_top()
A Dbn_nist.c13 #define BN_NIST_192_TOP (192+BN_BITS2-1)/BN_BITS2
14 #define BN_NIST_224_TOP (224+BN_BITS2-1)/BN_BITS2
15 #define BN_NIST_256_TOP (256+BN_BITS2-1)/BN_BITS2
16 #define BN_NIST_384_TOP (384+BN_BITS2-1)/BN_BITS2
17 #define BN_NIST_521_TOP (521+BN_BITS2-1)/BN_BITS2
20 #if BN_BITS2 == 64
273 #if BN_BITS2 == 64
503 #if BN_BITS2==64 in BN_nist_mod_224()
567 # if BN_BITS2==64 in BN_nist_mod_224()
584 # if BN_BITS2==64 in BN_nist_mod_224()
[all …]
A Dbn_gf2m.c321 dN = p[0] / BN_BITS2; in BN_GF2m_mod_arr()
333 d0 = n % BN_BITS2; in BN_GF2m_mod_arr()
334 d1 = BN_BITS2 - d0; in BN_GF2m_mod_arr()
335 n /= BN_BITS2; in BN_GF2m_mod_arr()
343 d0 = p[0] % BN_BITS2; in BN_GF2m_mod_arr()
344 d1 = BN_BITS2 - d0; in BN_GF2m_mod_arr()
353 d0 = p[0] % BN_BITS2; in BN_GF2m_mod_arr()
357 d1 = BN_BITS2 - d0; in BN_GF2m_mod_arr()
370 n = p[k] / BN_BITS2; in BN_GF2m_mod_arr()
371 d0 = p[k] % BN_BITS2; in BN_GF2m_mod_arr()
[all …]
A Dbn_mont.c294 mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2; in BN_MONT_CTX_set()
296 # if defined(OPENSSL_BN_ASM_MONT) && (BN_BITS2<=32) in BN_MONT_CTX_set()
305 if (!(BN_set_bit(R, 2 * BN_BITS2))) in BN_MONT_CTX_set()
318 if (!BN_lshift(Ri, Ri, 2 * BN_BITS2)) in BN_MONT_CTX_set()
342 if (!(BN_set_bit(R, BN_BITS2))) in BN_MONT_CTX_set()
353 if (!BN_lshift(Ri, Ri, BN_BITS2)) in BN_MONT_CTX_set()
A Dbn_local.h194 # define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)
476 # define Hw(t) (((BN_ULONG)((t)>>BN_BITS2))&BN_MASK2)
566 # define LHBITS(a) (((a)>>BN_BITS2)&BN_MASKl)
567 # define LL2HBITS(a) ((BN_ULLONG)((a)&BN_MASKl)<<BN_BITS2)
666 if (bits > (INT_MAX - BN_BITS2 + 1)) in bn_expand()
669 if (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) in bn_expand()
672 return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2); in bn_expand()
A Dbn_word.c54 ret = (BN_ULLONG) (((ret << (BN_ULLONG) BN_BITS2) | a->d[i]) % in BN_mod_word()
76 j = BN_BITS2 - BN_num_bits_word(w); in BN_div_word()
A Dbn_print.c41 for (j = BN_BITS2 - 4; j >= 0; j -= 4) { in BN_print()
A Dbn_asm.c200 return ((BN_ULONG)(((((BN_ULLONG) h) << BN_BITS2) | l) / (BN_ULLONG) d)); in bn_div_words()
216 assert((i == BN_BITS2) || (h <= (BN_ULONG)1 << i)); in bn_div_words()
218 i = BN_BITS2 - i; in bn_div_words()
224 h = (h << i) | (l >> (BN_BITS2 - i)); in bn_div_words()
285 ll >>= BN_BITS2; in bn_add_words()
288 ll >>= BN_BITS2; in bn_add_words()
291 ll >>= BN_BITS2; in bn_add_words()
294 ll >>= BN_BITS2; in bn_add_words()
304 ll >>= BN_BITS2; in bn_add_words()
A Dbn_exp.c381 if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) { in BN_mod_exp_mont()
474 wordpos = bitpos / BN_BITS2; in bn_get_bits()
475 bitpos %= BN_BITS2; in bn_get_bits()
481 ret |= a->d[wordpos] << (BN_BITS2 - bitpos); in bn_get_bits()
621 bits = p->top * BN_BITS2; in BN_mod_exp_mont_consttime()
742 if (m->d[top - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) { in BN_mod_exp_mont_consttime()
A Drsaz_exp_x2.c542 i = idx / BN_BITS2;
543 j = idx % BN_BITS2;
A Dbn_conv.c34 for (j = BN_BITS2 - 8; j >= 0; j -= 8) { in BN_bn2hex()
A Dbn_rsa_fips186_4.c31 #if BN_BITS2 == 64
A Dbn_mod.c52 BN_ULONG storage[1024 / BN_BITS2]; in bn_mod_add_fixed_top()
A Dbn_gcd.c583 for (j = 0; j < BN_BITS2; j++) { in BN_gcd()
A Dbn_prime.c32 #if BN_BITS2 == 64
A DREADME.pod77 BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */
A Dbn_dh.c16 # if BN_BITS2 == 64
/openssl-master/test/
A Dexptest.c23 #define NUM_BITS (BN_BITS2 * 4)
149 c = (c % BN_BITS) - BN_BITS2; in test_mod_exp()
156 c = (c % BN_BITS) - BN_BITS2; in test_mod_exp()
163 c = (c % BN_BITS) - BN_BITS2; in test_mod_exp()
A Dbntest.c171 top = BN_num_bits(a) / BN_BITS2; in test_swap()
/openssl-master/crypto/ec/
A Dec2_smpl.c89 if (bn_wexpand(dest->a, (int)(dest->poly[0] + BN_BITS2 - 1) / BN_BITS2) == in ossl_ec_GF2m_simple_group_copy()
92 if (bn_wexpand(dest->b, (int)(dest->poly[0] + BN_BITS2 - 1) / BN_BITS2) == in ossl_ec_GF2m_simple_group_copy()
119 if (bn_wexpand(group->a, (int)(group->poly[0] + BN_BITS2 - 1) / BN_BITS2) in ossl_ec_GF2m_simple_group_set_curve()
127 if (bn_wexpand(group->b, (int)(group->poly[0] + BN_BITS2 - 1) / BN_BITS2) in ossl_ec_GF2m_simple_group_set_curve()
A Decp_nistz256.c34 #if BN_BITS2 != 64
49 #define P256_LIMBS (256/BN_BITS2)
199 in >>= BN_BITS2 - 1; in is_zero()
/openssl-master/crypto/
A Dsparse_array.c40 #elif OPENSSL_SA_BLOCK_BITS < 2 || OPENSSL_SA_BLOCK_BITS > (BN_BITS2 - 1)
/openssl-master/include/openssl/
A Dbn.h54 # define BN_BITS2 (BN_BYTES * 8) macro
55 # define BN_BITS (BN_BITS2 * 2)
56 # define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1))

Completed in 51 milliseconds