Home
last modified time | relevance | path

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

123

/freebsd/crypto/openssl/crypto/rsa/
H A Drsa_sp800_56b_check.c56 && (BN_cmp(rsa->dmp1, BN_value_one()) > 0) in ossl_rsa_check_crt_components()
57 && (BN_cmp(rsa->dmp1, p1) < 0) in ossl_rsa_check_crt_components()
59 && (BN_cmp(rsa->dmq1, BN_value_one()) > 0) in ossl_rsa_check_crt_components()
60 && (BN_cmp(rsa->dmq1, q1) < 0) in ossl_rsa_check_crt_components()
62 && (BN_cmp(rsa->iqmp, BN_value_one()) > 0) in ossl_rsa_check_crt_components()
63 && (BN_cmp(rsa->iqmp, rsa->p) < 0) in ossl_rsa_check_crt_components()
121 if (BN_cmp(p, low) <= 0) in ossl_rsa_check_prime_factor_range()
208 && (BN_cmp(rsa->d, lcm) < 0) in ossl_rsa_check_private_exponent()
235 return BN_is_odd(e) && BN_cmp(e, BN_value_one()) > 0; in ossl_rsa_check_public_exponent()
359 return BN_cmp(rsa->d, BN_value_one()) >= 0 && BN_cmp(rsa->d, rsa->n) < 0;
[all …]
H A Drsa_chk.c100 if (BN_cmp(i, key->n) != 0) { in rsa_validate_keypair_multiprime()
170 if (BN_cmp(j, key->dmp1) != 0) { in rsa_validate_keypair_multiprime()
184 if (BN_cmp(j, key->dmq1) != 0) { in rsa_validate_keypair_multiprime()
194 if (BN_cmp(i, key->iqmp) != 0) { in rsa_validate_keypair_multiprime()
211 if (BN_cmp(j, pinfo->d) != 0) { in rsa_validate_keypair_multiprime()
220 if (BN_cmp(i, pinfo->t) != 0) { in rsa_validate_keypair_multiprime()
H A Drsa_sp800_56b_gen.c407 if (info == NULL && BN_cmp(rsa->p, rsa->q) < 0) { in ossl_rsa_sp800_56b_generate_key()
452 && BN_cmp(k, tmp) == 0); in ossl_rsa_sp800_56b_pairwise_test()
/freebsd/crypto/openssl/crypto/ffc/
H A Dffc_key_validate.c42 if (BN_cmp(pub_key, tmp) <= 0) in ossl_ffc_validate_public_key_partial()
48 if (BN_cmp(pub_key, tmp) >= 0) in ossl_ffc_validate_public_key_partial()
113 if (BN_cmp(priv, BN_value_one()) < 0) { in ossl_ffc_validate_private_key()
117 if (BN_cmp(priv, upper) >= 0) { in ossl_ffc_validate_private_key()
H A Dffc_key_generate.c44 m = (BN_cmp(two_powN, params->q) > 0) ? params->q : two_powN; in ossl_ffc_generate_private_key()
52 if (BN_cmp(priv, m) < 0) in ossl_ffc_generate_private_key()
H A Dffc_params_validate.c33 if (BN_cmp(g, BN_value_one()) <= 0 || BN_cmp(g, p) >= 0) { in ossl_ffc_params_validate_unverifiable_g()
45 if (BN_cmp(tmp, BN_value_one()) != 0) { in ossl_ffc_params_validate_unverifiable_g()
H A Dffc_dh.c123 if (BN_cmp(p, dh_named_groups[i].p) == 0 in ossl_ffc_numbers_to_dh_named_group()
124 && BN_cmp(g, dh_named_groups[i].g) == 0 in ossl_ffc_numbers_to_dh_named_group()
126 && (q == NULL || BN_cmp(q, dh_named_groups[i].q) == 0)) in ossl_ffc_numbers_to_dh_named_group()
H A Dffc_params_generate.c111 if (BN_cmp(g, BN_value_one()) > 0) in generate_unverifiable_g()
115 if (!BN_add_word(hbn, 1) || BN_cmp(hbn, pm1) >= 0) in generate_unverifiable_g()
181 if (BN_cmp(g, BN_value_one()) > 0) { in generate_canonical_g()
286 if (BN_cmp(p, test) >= 0) { in generate_p()
690 if (verify && (BN_cmp(q, params->q) != 0)) { in ossl_ffc_params_FIPS186_4_gen_verify()
722 if (verify && (pcounter != counter || (BN_cmp(p, params->p) != 0))) in ossl_ffc_params_FIPS186_4_gen_verify()
757 if (verify && BN_cmp(g, params->g) != 0) { in ossl_ffc_params_FIPS186_4_gen_verify()
976 if (BN_cmp(p, params->p) != 0) { in ossl_ffc_params_FIPS186_2_gen_verify()
H A Dffc_params.c210 return BN_cmp(a->p, b->p) == 0 in ossl_ffc_params_cmp()
211 && BN_cmp(a->g, b->g) == 0 in ossl_ffc_params_cmp()
212 && (ignore_q || BN_cmp(a->q, b->q) == 0); /* Note: q may be NULL */ in ossl_ffc_params_cmp()
/freebsd/crypto/openssl/doc/man3/
H A DBN_cmp.pod5 BN_cmp, BN_ucmp, BN_is_zero, BN_is_one, BN_is_word, BN_abs_is_word, BN_is_odd, BN_are_coprime
12 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
25 BN_cmp() compares the numbers I<a> and I<b>. BN_ucmp() compares their
38 BN_cmp() returns -1 if I<a> E<lt> I<b>, 0 if I<a> == I<b> and 1 if
/freebsd/crypto/openssl/crypto/dh/
H A Ddh_check.c93 if (BN_cmp(dh->params.g, tmp) >= 0) in DH_check_params()
183 if (BN_cmp(dh->params.g, BN_value_one()) <= 0) in DH_check()
185 else if (BN_cmp(dh->params.g, dh->params.p) >= 0) in DH_check()
205 && BN_cmp(dh->params.j, t1)) in DH_check()
317 if (BN_cmp(two_powN, dh->params.q) < 0) in ossl_dh_check_priv_key()
380 ret = BN_cmp(pub_key, dh->pub_key) == 0; in ossl_dh_check_pairwise()
/freebsd/crypto/openssl/crypto/sm2/
H A Dsm2_key.c41 if (BN_cmp(priv_key, BN_value_one()) < 0 in ossl_sm2_key_private_check()
42 || BN_cmp(priv_key, max) >= 0) { in ossl_sm2_key_private_check()
H A Dsm2_sign.c292 if (BN_cmp(rk, order) == 0) in sm2_sig_gen()
375 if (BN_cmp(r, BN_value_one()) < 0 in sm2_sig_verify()
376 || BN_cmp(s, BN_value_one()) < 0 in sm2_sig_verify()
377 || BN_cmp(order, r) <= 0 in sm2_sig_verify()
378 || BN_cmp(order, s) <= 0) { in sm2_sig_verify()
404 if (BN_cmp(r, t) == 0) in sm2_sig_verify()
/freebsd/crypto/openssl/test/
H A Dexptest.c208 if (BN_cmp(r_simple, r_mont) != 0) in test_mod_exp()
210 if (BN_cmp(r_simple, r_mont_const) != 0) in test_mod_exp()
212 if (BN_cmp(r_simple, r_recp) != 0) in test_mod_exp()
297 if (BN_cmp(r_simple1, r_mont_const_x2_1) != 0) in test_mod_exp_x2()
299 if (BN_cmp(r_simple2, r_mont_const_x2_2) != 0) in test_mod_exp_x2()
/freebsd/crypto/openssl/crypto/bn/
H A Dbn_rand.c171 if (BN_cmp(r, range) >= 0) { in bnrand_range()
174 if (BN_cmp(r, range) >= 0) in bnrand_range()
184 } while (BN_cmp(r, range) >= 0); in bnrand_range()
196 } while (BN_cmp(r, range) >= 0); in bnrand_range()
H A Dbn_prime.c288 if (BN_cmp(w, BN_value_one()) <= 0) in bn_is_prime_int()
418 if (BN_is_one(z) || BN_cmp(z, w1) == 0) in ossl_bn_miller_rabin_is_prime()
426 if (BN_cmp(z, w1) == 0) in ossl_bn_miller_rabin_is_prime()
H A Dbn_mod.c260 if (BN_cmp(r, m) >= 0) in BN_mod_lshift1_quick()
326 if (BN_cmp(r, m) >= 0) { in BN_mod_lshift_quick()
/freebsd/crypto/openssl/fuzz/
H A Dbndiv.c95 success = success && BN_cmp(b5, b1) == 0; in FuzzerTestOneInput()
112 BN_cmp(b5, b1)); in FuzzerTestOneInput()
H A Dbignum.c80 success = BN_cmp(b4, b5) == 0; in FuzzerTestOneInput()
/freebsd/crypto/openssh/
H A Ddh.c144 if (BN_cmp(dhg->g, BN_value_one()) <= 0) { in parse_prime()
249 if (BN_cmp(dh_pub, BN_value_one()) != 1) { /* pub_exp <= 1 */ in dh_pub_is_valid()
259 BN_cmp(dh_pub, tmp) != -1) { /* pub_exp > p-2 */ in dh_pub_is_valid()
/freebsd/crypto/openssl/crypto/ec/
H A Dec_key.c508 || BN_cmp(x, key->group->field) >= 0 in ec_key_public_range_check()
510 || BN_cmp(y, key->group->field) >= 0) { in ec_key_public_range_check()
610 if (BN_cmp(eckey->priv_key, BN_value_one()) < 0 in ossl_ec_key_private_check()
611 || BN_cmp(eckey->priv_key, eckey->group->order) >= 0) { in ossl_ec_key_private_check()
726 if (BN_cmp(x, tx) || BN_cmp(y, ty)) { in EC_KEY_set_public_key_affine_coordinates()
H A Dec2_smpl.c330 if (BN_cmp(point->Z, BN_value_one())) { in ossl_ec_GF2m_simple_point_get_affine_coordinates()
596 return ((BN_cmp(a->X, b->X) == 0) && BN_cmp(a->Y, b->Y) == 0) ? 0 : 1; in ossl_ec_GF2m_simple_cmp()
619 ret = ((BN_cmp(aX, bX) == 0) && BN_cmp(aY, bY) == 0) ? 0 : 1; in ossl_ec_GF2m_simple_cmp()
/freebsd/crypto/openssh/regress/unittests/sshbuf/
H A Dtest_sshbuf_getput_crypto.c266 ASSERT_INT_EQ(BN_cmp(bn_x, bn), 0); in sshbuf_getput_crypto_tests()
267 ASSERT_INT_EQ(BN_cmp(bn_y, bn2), 0); in sshbuf_getput_crypto_tests()
/freebsd/crypto/openssl/crypto/dsa/
H A Ddsa_check.c128 ret = BN_cmp(pub_key, dsa->pub_key) == 0; in ossl_dsa_check_pairwise()
/freebsd/crypto/openssl/providers/implementations/keymgmt/
H A Drsa_kmgmt.c145 ok = ok && BN_cmp(RSA_get0_e(rsa1), RSA_get0_e(rsa2)) == 0; in rsa_match()
154 ok = ok && BN_cmp(pa, pb) == 0; in rsa_match()
164 ok = ok && BN_cmp(pa, pb) == 0; in rsa_match()

123