Home
last modified time | relevance | path

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

123

/freebsd/crypto/openssl/fuzz/
H A Dbndiv.c78 if (BN_is_zero(b2)) { in FuzzerTestOneInput()
84 if (BN_is_zero(b1)) in FuzzerTestOneInput()
85 success = BN_is_zero(b3) && BN_is_zero(b4); in FuzzerTestOneInput()
87 success = (BN_is_negative(b3) != BN_is_negative(b2) || BN_is_zero(b3)) in FuzzerTestOneInput()
88 && (BN_is_negative(b4) || BN_is_zero(b4)); in FuzzerTestOneInput()
90 success = (BN_is_negative(b3) == BN_is_negative(b2) || BN_is_zero(b3)) in FuzzerTestOneInput()
91 && (!BN_is_negative(b4) || BN_is_zero(b4)); in FuzzerTestOneInput()
109 BN_is_negative(b3), BN_is_negative(b4), BN_is_zero(b4), in FuzzerTestOneInput()
111 && (BN_is_negative(b4) || BN_is_zero(b4)), in FuzzerTestOneInput()
/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 - BIGNUM comparison a…
14 int BN_is_zero(const BIGNUM *a);
25 BN_is_zero(), BN_is_one(), BN_is_word() and BN_abs_is_word() test if
35 BN_is_zero(), BN_is_one() BN_is_word(), BN_abs_is_word() and
40 Prior to OpenSSL 1.1.0, BN_is_zero(), BN_is_one(), BN_is_word(),
/freebsd/crypto/openssl/crypto/dsa/
H A Ddsa_ossl.c144 } while (BN_is_zero(blind)); in ossl_dsa_do_sign_int()
179 if (BN_is_zero(ret->r) || BN_is_zero(ret->s)) { in ossl_dsa_do_sign_int()
225 if (BN_is_zero(dsa->params.p) in dsa_sign_setup()
226 || BN_is_zero(dsa->params.q) in dsa_sign_setup()
227 || BN_is_zero(dsa->params.g) in dsa_sign_setup()
370 if (BN_is_zero(r) || BN_is_negative(r) || in dsa_do_verify()
375 if (BN_is_zero(s) || BN_is_negative(s) || in dsa_do_verify()
/freebsd/crypto/openssl/crypto/bn/
H A Dbn_sqrt.c47 if (BN_is_zero(a) || BN_is_one(a)) { in BN_mod_sqrt()
193 if (BN_is_zero(y)) in BN_mod_sqrt()
258 if (BN_is_zero(t)) { /* special case: p = 2^e + 1 */ in BN_mod_sqrt()
261 if (BN_is_zero(t)) { in BN_mod_sqrt()
271 if (BN_is_zero(x)) { in BN_mod_sqrt()
H A Dbn_gcd.c82 while (!BN_is_zero(B)) { in bn_mod_inverse_no_branch()
206 if (BN_abs_is_word(n, 1) || BN_is_zero(n)) { in int_bn_mod_inverse()
269 while (!BN_is_zero(B)) { in int_bn_mod_inverse()
357 while (!BN_is_zero(B)) { in int_bn_mod_inverse()
558 if (BN_is_zero(in_b)) { in BN_gcd()
563 if (BN_is_zero(in_a)) { in BN_gcd()
H A Dbn_word.c110 if (BN_is_zero(a)) in BN_add_word()
116 if (!BN_is_zero(a)) in BN_add_word()
145 if (BN_is_zero(a)) { in BN_sub_word()
H A Dbn_kron.c56 if (BN_is_zero(B)) { in BN_kronecker()
102 if (BN_is_zero(A)) { in BN_kronecker()
H A Dbn_conv.c23 if (BN_is_zero(a)) in BN_bn2hex()
82 if (BN_is_zero(t)) { in BN_bn2dec()
89 while (!BN_is_zero(t)) { in BN_bn2dec()
H A Dbn_gf2m.c581 if (BN_is_zero(u)) in BN_GF2m_mod_inv_vartime()
592 if (BN_is_zero(u)) in BN_GF2m_mod_inv_vartime()
753 } while (BN_is_zero(b)); in BN_GF2m_mod_inv()
875 if (BN_is_zero(b)) in BN_GF2m_mod_exp_arr()
1032 if (BN_is_zero(a)) { in BN_GF2m_mod_solve_quad_arr()
1080 } while (BN_is_zero(w) && (count < MAX_ITERATIONS)); in BN_GF2m_mod_solve_quad_arr()
1081 if (BN_is_zero(w)) { in BN_GF2m_mod_solve_quad_arr()
1152 if (BN_is_zero(a)) in BN_GF2m_poly2arr()
H A Dbn_exp2.c77 if (BN_is_zero(a_mod_m)) { in BN_mod_exp2_mont()
106 if (BN_is_zero(a_mod_m)) { in BN_mod_exp2_mont()
H A Dbn_recp.c47 if (BN_is_zero(d) || !BN_copy(&(recp->N), d)) in BN_RECP_CTX_set()
158 r->neg = BN_is_zero(r) ? 0 : m->neg; in BN_div_recp()
H A Dbn_div.c26 if (BN_is_zero(d)) {
80 rem->neg = BN_is_zero(rem) ? 0 : m->neg;
214 if (BN_is_zero(divisor)) { in BN_div()
H A Dbn_print.c38 if (BN_is_zero(a) && BIO_write(bp, "0", 1) != 1) in BN_print()
H A Dbn_mont.c268 if (BN_is_zero(mod)) in BN_MONT_CTX_set()
320 if (!BN_is_zero(Ri)) { in BN_MONT_CTX_set()
355 if (!BN_is_zero(Ri)) { in BN_MONT_CTX_set()
/freebsd/crypto/openssl/crypto/ec/
H A Dec2_smpl.c208 if (BN_is_zero(b)) in ossl_ec_GF2m_simple_group_check_discriminant()
432 if (BN_GF2m_cmp(y0, y1) || BN_is_zero(x1)) { in ossl_ec_GF2m_simple_add()
486 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y)) in ossl_ec_GF2m_simple_invert()
500 return BN_is_zero(point->Z); in ossl_ec_GF2m_simple_is_at_infinity()
564 ret = BN_is_zero(lh); in ossl_ec_GF2m_simple_is_on_curve()
737 } while (BN_is_zero(s->Z)); in ec_GF2m_simple_ladder_pre()
752 } while (BN_is_zero(r->Y)); in ec_GF2m_simple_ladder_pre()
812 if (BN_is_zero(r->Z)) in ec_GF2m_simple_ladder_post()
815 if (BN_is_zero(s->Z)) { in ec_GF2m_simple_ladder_post()
891 if (num > 1 || BN_is_zero(group->order) || BN_is_zero(group->cofactor)) in ec_GF2m_simple_points_mul()
H A Decp_smpl.c291 if (BN_is_zero(a)) { in ossl_ec_GFp_simple_group_check_discriminant()
292 if (BN_is_zero(b)) in ossl_ec_GFp_simple_group_check_discriminant()
294 } else if (!BN_is_zero(b)) { in ossl_ec_GFp_simple_group_check_discriminant()
311 if (BN_is_zero(a)) in ossl_ec_GFp_simple_group_check_discriminant()
710 if (BN_is_zero(n5)) { in ossl_ec_GFp_simple_add()
711 if (BN_is_zero(n6)) { in ossl_ec_GFp_simple_add()
943 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y)) in ossl_ec_GFp_simple_invert()
953 return BN_is_zero(point->Z); in ossl_ec_GFp_simple_is_at_infinity()
1244 if (!BN_is_zero(points[0]->Z)) { in ossl_ec_GFp_simple_points_make_affine()
1258 if (!BN_is_zero(points[i]->Z)) { in ossl_ec_GFp_simple_points_make_affine()
[all …]
H A Dec2_oct.c68 if (BN_is_zero(x)) { in ossl_ec_GF2m_simple_set_compressed_coordinates()
190 if ((form != POINT_CONVERSION_UNCOMPRESSED) && !BN_is_zero(x)) { in ossl_ec_GF2m_simple_point2oct()
358 if (BN_is_zero(x)) { in ossl_ec_GF2m_simple_oct2point()
H A Decdsa_ossl.c180 } while (BN_is_zero(r)); in ecdsa_sign_setup()
323 if (BN_is_zero(s)) { in ossl_ecdsa_simple_sign_sig()
430 if (BN_is_zero(sig->r) || BN_is_negative(sig->r) || in ossl_ecdsa_simple_verify_sig()
431 BN_ucmp(sig->r, order) >= 0 || BN_is_zero(sig->s) || in ossl_ecdsa_simple_verify_sig()
H A Dec_mult.c161 if (BN_is_zero(group->order)) { in ossl_ec_scalar_mul_ladder()
165 if (BN_is_zero(group->cofactor)) { in ossl_ec_scalar_mul_ladder()
438 if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) { in ossl_ec_wNAF_mul()
868 if (BN_is_zero(order)) { in ossl_ec_wNAF_precompute_mult()
H A Dec_lib.c372 if (group->field == NULL || BN_is_zero(group->field) in EC_GROUP_set_generator()
383 if (order == NULL || BN_is_zero(order) || BN_is_negative(order) in EC_GROUP_set_generator()
411 if (cofactor != NULL && !BN_is_zero(cofactor)) { in EC_GROUP_set_generator()
450 return !BN_is_zero(order); in EC_GROUP_get_order()
472 return !BN_is_zero(group->cofactor); in EC_GROUP_get_cofactor()
701 if (!BN_is_zero(ac) && !BN_is_zero(bc) && BN_cmp(ac, bc) != 0) in EC_GROUP_cmp()
1634 if (BN_is_negative(p) || BN_is_zero(p)) { in EC_GROUP_new_from_params()
1699 || (BN_is_negative(order) || BN_is_zero(order)) in EC_GROUP_new_from_params()
/freebsd/crypto/openssl/test/testutil/
H A Dtests.c381 DEFINE_BN_COMPARISONS(eq, ==, BN_is_zero(a))
382 DEFINE_BN_COMPARISONS(ne, !=, !BN_is_zero(a))
383 DEFINE_BN_COMPARISONS(gt, >, !BN_is_negative(a) && !BN_is_zero(a))
384 DEFINE_BN_COMPARISONS(ge, >=, !BN_is_negative(a) || BN_is_zero(a))
385 DEFINE_BN_COMPARISONS(lt, <, BN_is_negative(a) && !BN_is_zero(a))
386 DEFINE_BN_COMPARISONS(le, <=, BN_is_negative(a) || BN_is_zero(a))
/freebsd/usr.bin/dc/
H A Dbcode.c702 if (BN_is_zero(n->number)) in count_digits()
711 while (!BN_is_zero(int_part->number)) { in count_digits()
1099 if (BN_is_zero(a->number)) in bmod()
1140 if (BN_is_zero(a->number)) in bdivmod()
1198 if (!BN_is_zero(f)) in bexp()
1224 if (BN_is_zero(p->number)) { in bexp()
1242 while (!BN_is_zero(p->number)) { in bexp()
1263 if (BN_is_zero(r->number)) in bexp()
1290 ret = BN_is_zero(r); in bsqrt_stop()
1307 if (BN_is_zero(n->number)) { in bsqrt()
/freebsd/usr.bin/factor/
H A Dfactor.c88 #define BN_is_zero(v) (*(v) == 0) macro
171 if (BN_is_zero(val)) /* Historical practice; 0 just exits. */ in pr_fact()
/freebsd/crypto/openssl/crypto/asn1/
H A Dt_pkey.c58 if (BN_is_zero(num)) { in ASN1_bn_print()
/freebsd/crypto/openssl/crypto/sm2/
H A Dsm2_sign.c273 if (BN_is_zero(r)) in sm2_sig_gen()
294 if (BN_is_zero(s)) in sm2_sig_gen()
373 if (BN_is_zero(t)) { in sm2_sig_verify()

123