Home
last modified time | relevance | path

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

/external/boringssl/src/crypto/fipsmodule/bn/
Dshift.c77 nw = n / BN_BITS2; in BN_lshift()
81 lb = n % BN_BITS2; in BN_lshift()
82 rb = BN_BITS2 - lb; in BN_lshift()
125 c = t >> (BN_BITS2 - 1); in BN_lshift1()
145 nw = n / BN_BITS2; in BN_rshift()
146 rb = n % BN_BITS2; in BN_rshift()
147 lb = BN_BITS2 - rb; in BN_rshift()
152 i = (BN_num_bits(a) - n + (BN_BITS2 - 1)) / BN_BITS2; in BN_rshift()
212 c = t << (BN_BITS2 - 1); in BN_rshift1()
219 c = t << (BN_BITS2 - 1); in BN_rshift1()
[all …]
Dbn.c189 #if BN_BITS2 > 32 in BN_num_bits_word()
192 mask = (0u - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
199 mask = (0u - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
205 mask = (0u - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
211 mask = (0u - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
217 mask = (0u - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
223 mask = (0u - (mask >> (BN_BITS2 - 1))); in BN_num_bits_word()
235 return (width - 1) * BN_BITS2 + BN_num_bits_word(bn->d[width - 1]); in BN_num_bits()
267 #if BN_BITS2 == 64 in BN_set_u64()
269 #elif BN_BITS2 == 32 in BN_set_u64()
[all …]
Ddiv.c79 assert((i == BN_BITS2) || (h <= (BN_ULONG)1 << i)); in bn_div_words()
81 i = BN_BITS2 - i; in bn_div_words()
88 h = (h << i) | (l >> (BN_BITS2 - i)); in bn_div_words()
172 BN_ULLONG n = (((BN_ULLONG)n0) << BN_BITS2) | n1; in bn_div_rem_words()
233 norm_shift = BN_BITS2 - (BN_num_bits(divisor) % BN_BITS2); in BN_div()
238 norm_shift += BN_BITS2; in BN_div()
321 if (t2 <= ((((BN_ULLONG)rm) << BN_BITS2) | wnump[-2])) { in BN_div()
592 j = BN_BITS2 - BN_num_bits_word(w); in BN_div_word()
650 ret = (BN_ULLONG)(((ret << (BN_ULLONG)BN_BITS2) | a->d[i]) % (BN_ULLONG)w); in BN_mod_word()
662 size_t num_words = 1 + ((e - 1) / BN_BITS2); in BN_mod_pow2()
[all …]
Dmontgomery_inv.c32 #define LG_LITTLE_R (BN_MONT_CTX_N0_LIMBS * BN_BITS2)
75 n_mod_r |= (uint64_t)n->d[1] << BN_BITS2; in bn_mont_n0()
118 #if BN_BITS2 == 64 && defined(BN_ULLONG) in bn_neg_inv_mod_r_u64()
155 #if BN_BITS2 == 64 && defined(BN_ULLONG) in bn_neg_inv_mod_r_u64()
Dmontgomery.c206 mont->n0[1] = (BN_ULONG)(n0 >> BN_BITS2); in BN_MONT_CTX_set()
218 unsigned lgBigR = mont->N.top * BN_BITS2; in BN_MONT_CTX_set()
356 if (n->top > 0 && (n->d[n->top - 1] >> (BN_BITS2 - 1)) != 0) { in bn_one_to_montgomery()
419 if (num >= (128 / BN_BITS2) && in BN_mod_mul_montgomery()
480 if (num_n > 0 && (n[num_n - 1] >> (BN_BITS2 - 1)) != 0) { in bn_one_to_montgomery_small()
503 if (num_n >= (128 / BN_BITS2) && in bn_mod_mul_montgomery_small()
Dinternal.h151 #define BN_BITS2 64 in OPENSSL_MSVC_PRAGMA() macro
167 #define BN_BITS2 32 in OPENSSL_MSVC_PRAGMA()
197 #define Hw(t) ((BN_ULONG)((t) >> BN_BITS2)) in OPENSSL_MSVC_PRAGMA()
Dgeneric.c216 ll >>= BN_BITS2; in bn_add_words()
219 ll >>= BN_BITS2; in bn_add_words()
222 ll >>= BN_BITS2; in bn_add_words()
225 ll >>= BN_BITS2; in bn_add_words()
234 ll >>= BN_BITS2; in bn_add_words()
Dprime.c683 char is_single_word = bits <= BN_BITS2; in probable_prime()
702 if (bits == BN_BITS2) { in probable_prime()
Dbn_test.cc1780 for (unsigned i = 1; i < BN_BITS2; i++) { in TEST_F()
1785 for (unsigned i = 0; i < BN_BITS2; i++) { in TEST_F()
1797 const unsigned num_bits = buf[0] % (BN_BITS2 + 1); in TEST_F()
1798 if (num_bits == BN_BITS2) { in TEST_F()
1799 w |= kOne << (BN_BITS2 - 1); in TEST_F()
1814 static const BN_ULONG kTestVectors[][256 / BN_BITS2] = { in TEST_F()
Dexponentiation.c745 bits = BN_num_bits_word(p[num_p - 1]) + (num_p - 1) * BN_BITS2; in bn_mod_exp_mont_small()
1004 int max_bits = p->top * BN_BITS2; in BN_mod_exp_mont_consttime()
/external/boringssl/src/crypto/fipsmodule/ec/
Dp256-x86_64.h38 #define P256_LIMBS (256 / BN_BITS2)
Dp256-x86_64.c118 in >>= BN_BITS2 - 1; in is_not_zero()
/external/boringssl/src/crypto/bn_extra/
Dconvert.c98 for (int j = BN_BITS2 - 8; j >= 0; j -= 8) { in BN_bn2hex()
351 for (j = BN_BITS2 - 4; j >= 0; j -= 4) { in BN_print()
/external/boringssl/src/include/openssl/
Dbn.h150 #define BN_BITS2 64 macro
157 #define BN_BITS2 32
/external/boringssl/src/crypto/fipsmodule/rsa/
Drsa_impl.c842 if (bits < 128 || (bits % BN_BITS2) != 0) { in generate_prime()
984 int sqrt2_bits = kBoringSSLRSASqrtTwoLen * BN_BITS2; in RSA_generate_key_ex()
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa.c133 (out->words[i] >> shift) | (out->words[i + 1] << (BN_BITS2 - shift)); in digest_to_scalar()
/external/boringssl/src/crypto/rsa_extra/
Drsa_test.cc717 size_t bits = kBoringSSLRSASqrtTwoLen * BN_BITS2; in TEST()