/external/boringssl/src/crypto/fipsmodule/bn/ |
D | montgomery.c | 260 static int bn_from_montgomery_in_place(BN_ULONG *r, size_t num_r, BN_ULONG *a, in bn_from_montgomery_in_place() argument 264 if (num_r != num_n || num_a != 2 * num_n) { in bn_from_montgomery_in_place() 447 int bn_to_montgomery_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in bn_to_montgomery_small() argument 449 return bn_mod_mul_montgomery_small(r, num_r, a, num_a, mont->RR.d, in bn_to_montgomery_small() 453 int bn_from_montgomery_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in bn_from_montgomery_small() argument 456 if (num_a > 2 * num_n || num_r != num_n || num_n > BN_SMALL_MAX_WORDS) { in bn_from_montgomery_small() 464 int ret = bn_from_montgomery_in_place(r, num_r, tmp, num_tmp, mont); in bn_from_montgomery_small() 469 int bn_one_to_montgomery_small(BN_ULONG *r, size_t num_r, in bn_one_to_montgomery_small() argument 473 if (num_n == 0 || num_r != num_n) { in bn_one_to_montgomery_small() 488 return bn_from_montgomery_small(r, num_r, mont->RR.d, mont->RR.top, mont); in bn_one_to_montgomery_small() [all …]
|
D | internal.h | 378 int bn_mul_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, size_t num_a, in OPENSSL_MSVC_PRAGMA() 384 int bn_sqr_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, size_t num_a); in OPENSSL_MSVC_PRAGMA() 393 int bn_to_montgomery_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in OPENSSL_MSVC_PRAGMA() 401 int bn_from_montgomery_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in OPENSSL_MSVC_PRAGMA() 408 int bn_one_to_montgomery_small(BN_ULONG *r, size_t num_r, in OPENSSL_MSVC_PRAGMA() 421 int bn_mod_mul_montgomery_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in OPENSSL_MSVC_PRAGMA() 436 int bn_mod_exp_mont_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in OPENSSL_MSVC_PRAGMA() 444 int bn_mod_inverse_prime_mont_small(BN_ULONG *r, size_t num_r, in OPENSSL_MSVC_PRAGMA()
|
D | exponentiation.c | 731 int bn_mod_exp_mont_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, in bn_mod_exp_mont_small() argument 735 if (num_n != num_a || num_n != num_r || num_n > BN_SMALL_MAX_WORDS) { in bn_mod_exp_mont_small() 748 OPENSSL_memset(r, 0, num_r * sizeof(BN_ULONG)); in bn_mod_exp_mont_small() 780 if (!bn_one_to_montgomery_small(r, num_r, mont)) { in bn_mod_exp_mont_small() 789 !bn_mod_mul_montgomery_small(r, num_r, r, num_r, r, num_r, mont)) { in bn_mod_exp_mont_small() 813 if (!bn_mod_mul_montgomery_small(r, num_r, r, num_r, r, num_r, mont)) { in bn_mod_exp_mont_small() 821 if (!bn_mod_mul_montgomery_small(r, num_r, r, num_r, val[wvalue >> 1], in bn_mod_exp_mont_small() 840 int bn_mod_inverse_prime_mont_small(BN_ULONG *r, size_t num_r, in bn_mod_inverse_prime_mont_small() argument 864 return bn_mod_exp_mont_small(r, num_r, a, num_a, p_minus_two, num_p, mont); in bn_mod_inverse_prime_mont_small()
|
D | mul.c | 660 int bn_mul_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, size_t num_a, in bn_mul_small() argument 662 if (num_r != num_a + num_b) { in bn_mul_small() 887 int bn_sqr_small(BN_ULONG *r, size_t num_r, const BN_ULONG *a, size_t num_a) { in bn_sqr_small() argument 888 if (num_r != 2 * num_a || num_a > BN_SMALL_MAX_WORDS) { in bn_sqr_small()
|
D | bn_test.cc | 394 size_t num_r = 2 * num_a; in TestSquare() local 397 r_words(new BN_ULONG[num_r]); in TestSquare() 400 ASSERT_TRUE(bn_mul_small(r_words.get(), num_r, a_words.get(), num_a, in TestSquare() 402 ASSERT_TRUE(bn_set_words(ret.get(), r_words.get(), num_r)); in TestSquare() 405 OPENSSL_memset(r_words.get(), 'A', num_r * sizeof(BN_ULONG)); in TestSquare() 406 ASSERT_TRUE(bn_sqr_small(r_words.get(), num_r, a_words.get(), num_a)); in TestSquare() 408 ASSERT_TRUE(bn_set_words(ret.get(), r_words.get(), num_r)); in TestSquare() 461 size_t num_r = num_a + num_b; in TestProduct() local 464 b_words(new BN_ULONG[num_b]), r_words(new BN_ULONG[num_r]); in TestProduct() 468 ASSERT_TRUE(bn_mul_small(r_words.get(), num_r, a_words.get(), num_a, in TestProduct() [all …]
|
/external/libevent/ |
D | bufferevent_openssl.c | 561 unsigned long num_r = BIO_number_read(SSL_get_rbio(bev_ssl->ssl)); in decrement_buckets() local 564 unsigned long r = num_r - bev_ssl->counts.n_read; in decrement_buckets() 570 bev_ssl->counts.n_read = num_r; in decrement_buckets()
|