Home
last modified time | relevance | path

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

12

/external/boringssl/src/crypto/dh/
Dcheck.c79 if (BN_cmp(pub_key, tmp) <= 0) { in DH_check_pub_key()
88 if (BN_cmp(pub_key, tmp) >= 0) { in DH_check_pub_key()
141 if (BN_cmp(dh->g, BN_value_one()) <= 0) { in DH_check()
143 } else if (BN_cmp(dh->g, dh->p) >= 0) { in DH_check()
168 if (dh->j && BN_cmp(dh->j, t1)) { in DH_check()
Ddh_test.cc327 return BN_cmp(bn, hex_bn) == 0; in BIGNUMEqualsHex()
/external/boringssl/src/crypto/evp/
Dp_dsa_asn1.c235 return BN_cmp(a->pkey.dsa->p, b->pkey.dsa->p) == 0 && in dsa_cmp_parameters()
236 BN_cmp(a->pkey.dsa->q, b->pkey.dsa->q) == 0 && in dsa_cmp_parameters()
237 BN_cmp(a->pkey.dsa->g, b->pkey.dsa->g) == 0; in dsa_cmp_parameters()
241 return BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) == 0; in dsa_pub_cmp()
Dp_rsa_asn1.c112 return BN_cmp(b->pkey.rsa->n, a->pkey.rsa->n) == 0 && in rsa_pub_cmp()
113 BN_cmp(b->pkey.rsa->e, a->pkey.rsa->e) == 0; in rsa_pub_cmp()
/external/openssh/
Ddh.c130 if (BN_cmp(dhg->g, BN_value_one()) <= 0) { in parse_prime()
226 if (BN_cmp(dh_pub, BN_value_one()) != 1) { /* pub_exp <= 1 */ in dh_pub_is_valid()
236 BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */ in dh_pub_is_valid()
Dsshkey.c674 BN_cmp(a->rsa->e, b->rsa->e) == 0 && in sshkey_equal_public()
675 BN_cmp(a->rsa->n, b->rsa->n) == 0; in sshkey_equal_public()
679 BN_cmp(a->dsa->p, b->dsa->p) == 0 && in sshkey_equal_public()
680 BN_cmp(a->dsa->q, b->dsa->q) == 0 && in sshkey_equal_public()
681 BN_cmp(a->dsa->g, b->dsa->g) == 0 && in sshkey_equal_public()
682 BN_cmp(a->dsa->pub_key, b->dsa->pub_key) == 0; in sshkey_equal_public()
2933 if (BN_cmp(x, tmp) >= 0 || BN_cmp(y, tmp) >= 0) in sshkey_ec_validate_public()
2974 if (BN_cmp(EC_KEY_get0_private_key(key), tmp) >= 0) in sshkey_ec_validate_private()
Dsshconnect1.c600 if (BN_cmp(server_key->rsa->n, host_key->rsa->n) < 0) { in ssh_kex()
/external/boringssl/src/crypto/fipsmodule/bn/
Dsqrt.c410 if (!err && 0 != BN_cmp(x, A)) { in BN_mod_sqrt()
478 if (last_delta_valid && BN_cmp(delta, last_delta) >= 0) { in BN_sqrt()
489 if (BN_cmp(tmp, in) != 0) { in BN_sqrt()
Dcmp.c102 int BN_cmp(const BIGNUM *a, const BIGNUM *b) { in BN_cmp() function
149 return BN_cmp(a, &b_bn); in BN_cmp_word()
Dgcd.c125 if (BN_is_negative(a) || BN_cmp(a, n) >= 0) { in BN_mod_inverse_odd()
332 if (BN_is_negative(a) || BN_cmp(a, &mont->N) >= 0) { in BN_mod_inverse_blinded()
Dprime.c606 if (BN_cmp(w, BN_value_one()) <= 0) { in BN_primality_test()
890 if (BN_is_one(z) || BN_cmp(z, w1) == 0) { in BN_enhanced_miller_rabin_primality_test()
899 if (BN_cmp(z, w1) == 0) { in BN_enhanced_miller_rabin_primality_test()
Dbn_test.cc164 if (BN_cmp(expected, actual) == 0) { in AssertBIGNUMSEqual()
828 if (BN_cmp(ret.get(), mod_sqrt2.get()) != 0) { in TestModSqrt()
2224 EXPECT_EQ(BN_cmp(ten.get(), ten_copy.get()), 0); in TEST_F()
2225 EXPECT_EQ(BN_cmp(ten_copy.get(), ten.get()), 0); in TEST_F()
2228 EXPECT_LT(BN_cmp(eight.get(), ten.get()), 0); in TEST_F()
2229 EXPECT_GT(BN_cmp(ten.get(), eight.get()), 0); in TEST_F()
2232 EXPECT_GT(BN_cmp(forty_two.get(), ten.get()), 0); in TEST_F()
2233 EXPECT_LT(BN_cmp(ten.get(), forty_two.get()), 0); in TEST_F()
2236 EXPECT_GT(BN_cmp(two_exp_256.get(), ten.get()), 0); in TEST_F()
2237 EXPECT_LT(BN_cmp(ten.get(), two_exp_256.get()), 0); in TEST_F()
[all …]
/external/boringssl/src/crypto/fipsmodule/rsa/
Drsa_impl.c218 if (BN_cmp(rsa->p, rsa->q) < 0) { in freeze_private_key()
859 if (BN_cmp(rsa->p, rsa->q) < 0) { in mod_exp()
1021 if (BN_cmp(tmp, pow2_bits_100) <= 0) { in generate_prime()
1033 if (BN_cmp(out, sqrt2) <= 0) { in generate_prime()
1182 if (BN_cmp(rsa->p, rsa->q) < 0) { in rsa_generate_key_impl()
1205 } while (BN_cmp(rsa->d, pow2_prime_bits) <= 0); in rsa_generate_key_impl()
Drsa.c650 if (check_reduced && (BN_is_negative(ainv) || BN_cmp(ainv, m) >= 0)) { in check_mod_inverse()
712 if (BN_cmp(&n, key->n) != 0) { in RSA_check_key()
722 if (BN_is_negative(key->d) || BN_cmp(key->d, key->n) >= 0) { in RSA_check_key()
/external/boringssl/src/crypto/fipsmodule/ec/
Dec.c376 if (BN_cmp(tmp, &group->field) <= 0) { in EC_GROUP_set_generator()
396 group->field_greater_than_order = BN_cmp(&group->field, &group->order) > 0; in EC_GROUP_set_generator()
464 group->field_greater_than_order = BN_cmp(&group->field, &group->order) > 0; in ec_group_new_from_data()
605 BN_cmp(&a->order, &b->order) != 0 || in EC_GROUP_cmp()
606 BN_cmp(&a->field, &b->field) != 0 || in EC_GROUP_cmp()
Dfelem.c26 if (BN_is_negative(in) || BN_cmp(in, &group->field) >= 0) { in ec_bignum_to_felem()
Dp256-x86_64_test.cc235 if (BN_cmp(x.get(), p.get()) >= 0 || in PointToAffine()
236 BN_cmp(y.get(), p.get()) >= 0 || in PointToAffine()
237 BN_cmp(z.get(), p.get()) >= 0) { in PointToAffine()
Dec_test.cc438 EXPECT_EQ(0, BN_cmp(x.get(), qx.get())); in TEST()
439 EXPECT_EQ(0, BN_cmp(y.get(), qy.get())); in TEST()
858 EXPECT_EQ(0, BN_cmp(x.get(), px.get())); in TEST()
859 EXPECT_EQ(0, BN_cmp(y.get(), py.get())); in TEST()
Doct.c240 if (BN_is_negative(x) || BN_cmp(x, &group->field) >= 0) { in EC_POINT_set_compressed_coordinates_GFp()
Dsimple.c144 group->a_is_minus3 = (0 == BN_cmp(tmp, &group->field)); in ec_GFp_simple_group_set_curve()
/external/boringssl/src/crypto/rsa_extra/
Drsa_test.cc1037 EXPECT_LT(BN_cmp(sqrt.get(), pow2.get()), 0); in TEST()
1044 EXPECT_LT(BN_cmp(pow2.get(), sqrt.get()), 0); in TEST()
1086 auto raw_access = [&] { EXPECT_EQ(0, BN_cmp(rsa->d, rsa_template->d)); }; in TEST()
1090 EXPECT_EQ(0, BN_cmp(d, rsa_template->d)); in TEST()
/external/openssh/regress/unittests/sshbuf/
Dtest_sshbuf_getput_crypto.c397 ASSERT_INT_EQ(BN_cmp(bn_x, bn), 0); in sshbuf_getput_crypto_tests()
398 ASSERT_INT_EQ(BN_cmp(bn_y, bn2), 0); in sshbuf_getput_crypto_tests()
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa_test.cc453 EXPECT_EQ(0, BN_cmp(r.get(), sig->r)); in TEST()
454 EXPECT_EQ(0, BN_cmp(s.get(), sig->s)); in TEST()
/external/openssh/regress/unittests/test_helper/
Dtest_helper.c309 int r = BN_cmp(aa1, aa2); in assert_bignum()
/external/boringssl/src/include/openssl/
Dbn.h430 OPENSSL_EXPORT int BN_cmp(const BIGNUM *a, const BIGNUM *b);

12