Lines Matching refs:TEST_true

158     if (!(TEST_true(BN_bntest_rand(a, 1024, 1, 0))  in test_swap()
159 && TEST_true(BN_bntest_rand(b, 1024, 1, 0)) in test_swap()
191 || !TEST_true(BN_get_flags(b, BN_FLG_CONSTTIME)) in test_swap()
199 || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) in test_swap()
207 || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) in test_swap()
232 if (!(TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_sub()
235 && TEST_true(BN_add_word(b, i))) in test_sub()
238 if (!TEST_true(BN_bntest_rand(b, 400 + i - NUM1, 0, 0))) in test_sub()
243 if (!(TEST_true(BN_sub(c, a, b)) in test_sub()
244 && TEST_true(BN_add(c, c, b)) in test_sub()
245 && TEST_true(BN_sub(c, c, a)) in test_sub()
273 if (!(TEST_true(BN_bntest_rand(a, 400, 0, 0)) in test_div_recip()
275 && TEST_true(BN_lshift(a, a, i)) in test_div_recip()
276 && TEST_true(BN_add_word(a, i)))) in test_div_recip()
279 if (!(TEST_true(BN_bntest_rand(b, 50 + 3 * (i - NUM1), 0, 0)))) in test_div_recip()
284 if (!(TEST_true(BN_RECP_CTX_set(recp, b, ctx)) in test_div_recip()
285 && TEST_true(BN_div_recp(d, c, a, recp, ctx)) in test_div_recip()
286 && TEST_true(BN_mul(e, d, b, ctx)) in test_div_recip()
287 && TEST_true(BN_add(d, e, c)) in test_div_recip()
288 && TEST_true(BN_sub(d, d, a)) in test_div_recip()
337 if (TEST_true(BN_div(a, b, a, b, ctx)) in test_signed_mod_replace_ab()
360 if (TEST_true(BN_div(b, a, a, b, ctx)) in test_signed_mod_replace_ba()
384 if (!(TEST_true(BN_bntest_rand(a, 1024, 0, 0)))) in test_mod()
387 if (!(TEST_true(BN_bntest_rand(b, 450 + i * 10, 0, 0)))) in test_mod()
391 if (!(TEST_true(BN_mod(c, a, b, ctx)) in test_mod()
392 && TEST_true(BN_div(d, e, a, b, ctx)) in test_mod()
394 && TEST_true(BN_mul(c, d, b, ctx)) in test_mod()
395 && TEST_true(BN_add(d, c, e)) in test_mod()
472 if (!(TEST_true(BN_bntest_rand(m, 1024, 0, 1)) in test_modexp_mont5()
474 && TEST_true(BN_bntest_rand(a, 1024, 0, 0)))) in test_modexp_mont5()
478 if (!TEST_true(BN_mod_exp_mont_consttime(d, a, p, m, ctx, NULL))) in test_modexp_mont5()
484 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5()
489 && TEST_true(BN_hex2bn(&b, in test_modexp_mont5()
494 && TEST_true(BN_hex2bn(&n, in test_modexp_mont5()
501 if (!(TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
502 && TEST_true(BN_mod_mul_montgomery(c, a, b, mont, ctx)) in test_modexp_mont5()
503 && TEST_true(BN_mod_mul_montgomery(d, b, a, mont, ctx)) in test_modexp_mont5()
508 if (!(TEST_true(parse_bigBN(&n, bn1strings)) in test_modexp_mont5()
509 && TEST_true(parse_bigBN(&a, bn2strings)))) in test_modexp_mont5()
513 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
514 && TEST_true(BN_mod_mul_montgomery(c, a, a, mont, ctx)) in test_modexp_mont5()
515 && TEST_true(BN_mod_mul_montgomery(d, a, b, mont, ctx)) in test_modexp_mont5()
552 if (!(TEST_true(parse_bigBN(&a, ahex)) in test_modexp_mont5()
553 && TEST_true(parse_bigBN(&n, nhex)))) in test_modexp_mont5()
558 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)))) in test_modexp_mont5()
561 if (!TEST_true(BN_mod_mul_montgomery(c, a, a, mont, ctx)) in test_modexp_mont5()
562 || !TEST_true(BN_mod_mul_montgomery(d, a, b, mont, ctx)) in test_modexp_mont5()
567 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5()
571 && TEST_true(BN_hex2bn(&n, in test_modexp_mont5()
574 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
579 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5()
584 && TEST_true(BN_hex2bn(&b, in test_modexp_mont5()
589 && TEST_true(BN_hex2bn(&n, in test_modexp_mont5()
594 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
595 && TEST_true(BN_mod_exp_mont_consttime(c, a, b, n, ctx, mont)) in test_modexp_mont5()
596 && TEST_true(BN_mod_exp_mont(d, a, b, n, ctx, mont)) in test_modexp_mont5()
604 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5()
609 && TEST_true(BN_hex2bn(&b, in test_modexp_mont5()
614 && TEST_true(BN_hex2bn(&n, in test_modexp_mont5()
619 && TEST_true(BN_MONT_CTX_set(mont, n, ctx)) in test_modexp_mont5()
620 && TEST_true(BN_mod_exp_mont_consttime(c, a, b, n, ctx, mont)))) in test_modexp_mont5()
662 if (!TEST_true(parse_bigBN(&e, ehex)) in test_modexp_mont5()
663 || !TEST_true(parse_bigBN(&p, phex)) in test_modexp_mont5()
664 || !TEST_true(parse_bigBN(&m, mhex)) in test_modexp_mont5()
665 || !TEST_true(BN_mod_exp_mont_consttime(d, e, p, m, ctx, NULL)) in test_modexp_mont5()
666 || !TEST_true(BN_mod_exp_simple(a, e, p, m, ctx)) in test_modexp_mont5()
672 if (!TEST_true(BN_bntest_rand(p, 1024, 0, 0))) in test_modexp_mont5()
675 if (!TEST_true(BN_mod_exp_mont_consttime(d, a, p, m, ctx, NULL)) in test_modexp_mont5()
684 if (!(TEST_true(BN_one(a)) in test_modexp_mont5()
685 && TEST_true(BN_MONT_CTX_set(mont, m, ctx)))) in test_modexp_mont5()
687 if (!TEST_true(BN_from_montgomery(e, a, mont, ctx)) in test_modexp_mont5()
688 || !TEST_true(BN_mod_exp_mont_consttime(d, e, p, m, ctx, NULL)) in test_modexp_mont5()
689 || !TEST_true(BN_mod_exp_simple(a, e, p, m, ctx)) in test_modexp_mont5()
694 if (!(TEST_true(BN_bntest_rand(e, 1024, 0, 0)) in test_modexp_mont5()
695 && TEST_true(BN_mod_exp_mont_consttime(d, e, p, m, ctx, NULL)) in test_modexp_mont5()
696 && TEST_true(BN_mod_exp_simple(a, e, p, m, ctx)) in test_modexp_mont5()
727 if (!(TEST_true(BN_rand(a, 512, 0, 0)) in test_gf2m_add()
732 if (!(TEST_true(BN_GF2m_add(c, a, b)) in test_gf2m_add()
737 if (!(TEST_true(BN_GF2m_add(c, c, c)) in test_gf2m_add()
763 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_mod()
764 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_mod()
768 if (!TEST_true(BN_bntest_rand(a, 1024, 0, 0))) in test_gf2m_mod()
771 if (!(TEST_true(BN_GF2m_mod(c, a, b[j])) in test_gf2m_mod()
772 && TEST_true(BN_GF2m_add(d, a, c)) in test_gf2m_mod()
773 && TEST_true(BN_GF2m_mod(e, d, b[j])) in test_gf2m_mod()
807 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_mul()
808 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_mul()
812 if (!(TEST_true(BN_bntest_rand(a, 1024, 0, 0)) in test_gf2m_mul()
813 && TEST_true(BN_bntest_rand(c, 1024, 0, 0)) in test_gf2m_mul()
814 && TEST_true(BN_bntest_rand(d, 1024, 0, 0)))) in test_gf2m_mul()
817 if (!(TEST_true(BN_GF2m_mod_mul(e, a, c, b[j], ctx)) in test_gf2m_mul()
818 && TEST_true(BN_GF2m_add(f, a, d)) in test_gf2m_mul()
819 && TEST_true(BN_GF2m_mod_mul(g, f, c, b[j], ctx)) in test_gf2m_mul()
820 && TEST_true(BN_GF2m_mod_mul(h, d, c, b[j], ctx)) in test_gf2m_mul()
821 && TEST_true(BN_GF2m_add(f, e, g)) in test_gf2m_mul()
822 && TEST_true(BN_GF2m_add(f, f, h)) in test_gf2m_mul()
855 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_sqr()
856 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_sqr()
860 if (!TEST_true(BN_bntest_rand(a, 1024, 0, 0))) in test_gf2m_sqr()
863 if (!(TEST_true(BN_GF2m_mod_sqr(c, a, b[j], ctx)) in test_gf2m_sqr()
864 && TEST_true(BN_copy(d, a)) in test_gf2m_sqr()
865 && TEST_true(BN_GF2m_mod_mul(d, a, d, b[j], ctx)) in test_gf2m_sqr()
866 && TEST_true(BN_GF2m_add(d, c, d)) in test_gf2m_sqr()
895 if (!TEST_true(BN_one(b[0]))) in test_gf2m_modinv()
897 if (!TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_gf2m_modinv()
902 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_modinv()
903 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_modinv()
907 if (!TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_gf2m_modinv()
910 if (!(TEST_true(BN_GF2m_mod_inv(c, a, b[j], ctx)) in test_gf2m_modinv()
911 && TEST_true(BN_GF2m_mod_mul(d, a, c, b[j], ctx)) in test_gf2m_modinv()
942 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_moddiv()
943 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_moddiv()
947 if (!(TEST_true(BN_bntest_rand(a, 512, 0, 0)) in test_gf2m_moddiv()
948 && TEST_true(BN_bntest_rand(c, 512, 0, 0)))) in test_gf2m_moddiv()
951 if (!(TEST_true(BN_GF2m_mod_div(d, a, c, b[j], ctx)) in test_gf2m_moddiv()
952 && TEST_true(BN_GF2m_mod_mul(e, d, c, b[j], ctx)) in test_gf2m_moddiv()
953 && TEST_true(BN_GF2m_mod_div(f, a, e, b[j], ctx)) in test_gf2m_moddiv()
986 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_modexp()
987 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_modexp()
991 if (!(TEST_true(BN_bntest_rand(a, 512, 0, 0)) in test_gf2m_modexp()
992 && TEST_true(BN_bntest_rand(c, 512, 0, 0)) in test_gf2m_modexp()
993 && TEST_true(BN_bntest_rand(d, 512, 0, 0)))) in test_gf2m_modexp()
996 if (!(TEST_true(BN_GF2m_mod_exp(e, a, c, b[j], ctx)) in test_gf2m_modexp()
997 && TEST_true(BN_GF2m_mod_exp(f, a, d, b[j], ctx)) in test_gf2m_modexp()
998 && TEST_true(BN_GF2m_mod_mul(e, e, f, b[j], ctx)) in test_gf2m_modexp()
999 && TEST_true(BN_add(f, c, d)) in test_gf2m_modexp()
1000 && TEST_true(BN_GF2m_mod_exp(f, a, f, b[j], ctx)) in test_gf2m_modexp()
1001 && TEST_true(BN_GF2m_add(f, e, f)) in test_gf2m_modexp()
1034 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_modsqrt()
1035 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_modsqrt()
1039 if (!TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_gf2m_modsqrt()
1043 if (!(TEST_true(BN_GF2m_mod(c, a, b[j])) in test_gf2m_modsqrt()
1044 && TEST_true(BN_GF2m_mod_sqrt(d, a, b[j], ctx)) in test_gf2m_modsqrt()
1045 && TEST_true(BN_GF2m_mod_sqr(e, d, b[j], ctx)) in test_gf2m_modsqrt()
1046 && TEST_true(BN_GF2m_add(f, c, e)) in test_gf2m_modsqrt()
1078 if (!(TEST_true(BN_GF2m_arr2poly(p0, b[0])) in test_gf2m_modsolvequad()
1079 && TEST_true(BN_GF2m_arr2poly(p1, b[1])))) in test_gf2m_modsolvequad()
1083 if (!TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_gf2m_modsolvequad()
1089 if (!(TEST_true(BN_GF2m_mod_sqr(d, c, b[j], ctx)) in test_gf2m_modsolvequad()
1090 && TEST_true(BN_GF2m_add(d, c, d)) in test_gf2m_modsolvequad()
1091 && TEST_true(BN_GF2m_mod(e, a, b[j])) in test_gf2m_modsolvequad()
1092 && TEST_true(BN_GF2m_add(e, e, d)) in test_gf2m_modsolvequad()
1139 if (!TEST_true(BN_generate_prime_ex(b, 512, 0, NULL, NULL, NULL))) in test_kronecker()
1144 if (!TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_kronecker()
1149 if (!TEST_true(BN_copy(t, b))) in test_kronecker()
1152 if (!TEST_true(BN_sub_word(t, 1))) in test_kronecker()
1154 if (!TEST_true(BN_rshift1(t, t))) in test_kronecker()
1159 if (!TEST_true(BN_mod_exp_recp(r, a, t, b, ctx))) in test_kronecker()
1168 if (!TEST_true(BN_add_word(r, 1))) in test_kronecker()
1208 if (!TEST_true(BN_add(ret, a, b)) in file_sum()
1210 || !TEST_true(BN_sub(ret, sum, a)) in file_sum()
1212 || !TEST_true(BN_sub(ret, sum, b)) in file_sum()
1221 if (!TEST_true(BN_copy(ret, a)) in file_sum()
1222 || !TEST_true(BN_add(ret, ret, b)) in file_sum()
1224 || !TEST_true(BN_copy(ret, b)) in file_sum()
1225 || !TEST_true(BN_add(ret, a, ret)) in file_sum()
1227 || !TEST_true(BN_copy(ret, sum)) in file_sum()
1228 || !TEST_true(BN_sub(ret, ret, a)) in file_sum()
1230 || !TEST_true(BN_copy(ret, a)) in file_sum()
1231 || !TEST_true(BN_sub(ret, sum, ret)) in file_sum()
1233 || !TEST_true(BN_copy(ret, sum)) in file_sum()
1234 || !TEST_true(BN_sub(ret, ret, b)) in file_sum()
1236 || !TEST_true(BN_copy(ret, b)) in file_sum()
1237 || !TEST_true(BN_sub(ret, sum, ret)) in file_sum()
1248 if (!TEST_true(BN_uadd(ret, a, b)) in file_sum()
1250 || !TEST_true(BN_usub(ret, sum, a)) in file_sum()
1252 || !TEST_true(BN_usub(ret, sum, b)) in file_sum()
1261 if (!TEST_true(BN_copy(ret, a)) in file_sum()
1262 || !TEST_true(BN_uadd(ret, ret, b)) in file_sum()
1264 || !TEST_true(BN_copy(ret, b)) in file_sum()
1265 || !TEST_true(BN_uadd(ret, a, ret)) in file_sum()
1267 || !TEST_true(BN_copy(ret, sum)) in file_sum()
1268 || !TEST_true(BN_usub(ret, ret, a)) in file_sum()
1270 || !TEST_true(BN_copy(ret, a)) in file_sum()
1271 || !TEST_true(BN_usub(ret, sum, ret)) in file_sum()
1273 || !TEST_true(BN_copy(ret, sum)) in file_sum()
1274 || !TEST_true(BN_usub(ret, ret, b)) in file_sum()
1276 || !TEST_true(BN_copy(ret, b)) in file_sum()
1277 || !TEST_true(BN_usub(ret, sum, ret)) in file_sum()
1287 if (!TEST_true(BN_copy(ret, a)) in file_sum()
1288 || !TEST_true(BN_add_word(ret, b_word)) in file_sum()
1290 || !TEST_true(BN_copy(ret, sum)) in file_sum()
1291 || !TEST_true(BN_sub_word(ret, b_word)) in file_sum()
1321 if (!TEST_true(BN_set_word(two, 2)) in file_lshift1()
1322 || !TEST_true(BN_add(ret, a, a)) in file_lshift1()
1324 || !TEST_true(BN_mul(ret, a, two, ctx)) in file_lshift1()
1326 || !TEST_true(BN_div(ret, remainder, lshift1, two, ctx)) in file_lshift1()
1329 || !TEST_true(BN_lshift1(ret, a)) in file_lshift1()
1331 || !TEST_true(BN_rshift1(ret, lshift1)) in file_lshift1()
1333 || !TEST_true(BN_rshift1(ret, lshift1)) in file_lshift1()
1338 if (!TEST_true(BN_set_bit(lshift1, 0)) in file_lshift1()
1339 || !TEST_true(BN_div(ret, NULL /* rem */ , lshift1, two, ctx)) in file_lshift1()
1341 || !TEST_true(BN_rshift1(ret, lshift1)) in file_lshift1()
1368 if (!TEST_true(BN_lshift(ret, a, n)) in file_lshift()
1370 || !TEST_true(BN_rshift(ret, lshift, n)) in file_lshift()
1393 if (!TEST_true(BN_rshift(ret, a, n)) in file_rshift()
1399 if (!TEST_true(BN_rshift1(ret, a)) in file_rshift()
1426 if (!TEST_true(BN_sqr(ret, a, ctx)) in file_square()
1428 || !TEST_true(BN_mul(ret, a, a, ctx)) in file_square()
1430 || !TEST_true(BN_div(ret, remainder, square, a, ctx)) in file_square()
1437 if (!TEST_true(BN_sqrt(ret, square, ctx)) in file_square()
1444 || !TEST_true(BN_copy(tmp, square))) in file_square()
1488 if (!TEST_true(BN_mul(ret, a, b, ctx)) in file_product()
1490 || !TEST_true(BN_div(ret, remainder, product, a, ctx)) in file_product()
1493 || !TEST_true(BN_div(ret, remainder, product, b, ctx)) in file_product()
1525 if (!TEST_true(BN_div(ret, ret2, a, b, ctx)) in file_quotient()
1528 || !TEST_true(BN_mul(ret, quotient, b, ctx)) in file_quotient()
1529 || !TEST_true(BN_add(ret, ret, remainder)) in file_quotient()
1573 if (!TEST_true(BN_copy(nnmod, remainder)) in file_quotient()
1575 && !TEST_true(BN_add(nnmod, nnmod, b))) in file_quotient()
1576 || !TEST_true(BN_nnmod(ret, a, b, ctx)) in file_quotient()
1605 if (!TEST_true(BN_mod_mul(ret, a, b, m, ctx)) in file_modmul()
1616 || !TEST_true(BN_MONT_CTX_set(mont, m, ctx)) in file_modmul()
1617 || !TEST_true(BN_nnmod(a_tmp, a, m, ctx)) in file_modmul()
1618 || !TEST_true(BN_nnmod(b_tmp, b, m, ctx)) in file_modmul()
1619 || !TEST_true(BN_to_montgomery(a_tmp, a_tmp, mont, ctx)) in file_modmul()
1620 || !TEST_true(BN_to_montgomery(b_tmp, b_tmp, mont, ctx)) in file_modmul()
1621 || !TEST_true(BN_mod_mul_montgomery(ret, a_tmp, b_tmp, in file_modmul()
1623 || !TEST_true(BN_from_montgomery(ret, ret, mont, ctx)) in file_modmul()
1659 if (!TEST_true(BN_mod_exp(ret, a, e, m, ctx)) in file_modexp()
1664 if (!TEST_true(BN_mod_exp_mont(ret, a, e, m, ctx, NULL)) in file_modexp()
1666 || !TEST_true(BN_mod_exp_mont_consttime(ret, a, e, m, in file_modexp()
1682 if (!TEST_true(BN_mod_exp(d, a, b, c, ctx)) in file_modexp()
1683 || !TEST_true(BN_mul(e, a, a, ctx)) in file_modexp()
1711 if (!TEST_true(BN_exp(ret, a, e, ctx)) in file_exp()
1747 || !TEST_true(BN_sub(ret2, p, ret))) in file_modsqrt()
1776 if (!TEST_true(BN_gcd(ret, a, b, ctx)) in file_gcd()
1812 if (!TEST_true(BN_rand(n, bytes * 8, TOP_BIT_ON, BOTTOM_BIT_NOTOUCH))) in test_bn2padded()
1990 if (!TEST_true(BN_asc2bn(&bn, "0")) in test_asc2bn()
1995 if (!TEST_true(BN_asc2bn(&bn, "256")) in test_asc2bn()
2000 if (!TEST_true(BN_asc2bn(&bn, "-42")) in test_asc2bn()
2005 if (!TEST_true(BN_asc2bn(&bn, "0x1234")) in test_asc2bn()
2010 if (!TEST_true(BN_asc2bn(&bn, "0X1234")) in test_asc2bn()
2015 if (!TEST_true(BN_asc2bn(&bn, "-0xabcd")) in test_asc2bn()
2020 if (!TEST_true(BN_asc2bn(&bn, "-0")) in test_asc2bn()
2025 if (!TEST_true(BN_asc2bn(&bn, "123trailing garbage is ignored")) in test_asc2bn()
2055 || !TEST_true(BN_asc2bn(&bn, test->base10))) in test_mpi()
2091 || !TEST_true(BN_rand(bn, 1, 0 /* top */ , 0 /* bottom */ )) in test_rand()
2094 || !TEST_true(BN_rand(bn, 1, -1 /* top */ , 1 /* bottom */ )) in test_rand()
2096 || !TEST_true(BN_rand(bn, 2, 1 /* top */ , 0 /* bottom */ )) in test_rand()
2143 || !TEST_true(BN_set_word(rng, range))) in test_rand_range_single()
2146 if (!TEST_true(BN_rand_range(val, rng)) in test_rand_range_single()
2199 if (!TEST_true(BN_set_word(a, 1))) in test_negzero()
2203 if (!TEST_true(BN_mul(c, a, b, ctx))) in test_negzero()
2218 if (!TEST_true(BN_set_word(numerator, 1)) in test_negzero()
2219 || !TEST_true(BN_set_word(denominator, 2))) in test_negzero()
2222 if (!TEST_true(BN_div(a, b, numerator, denominator, ctx)) in test_negzero()
2228 if (!TEST_true(BN_set_word(denominator, 1)) in test_negzero()
2229 || !TEST_true(BN_div(a, b, numerator, denominator, ctx)) in test_negzero()
2295 if (!TEST_true(BN_set_word(b, 16))) in test_badmod()
2332 if (!TEST_true(BN_mod_exp(r, a, zero, BN_value_one(), NULL)) in test_expmodzero()
2334 || !TEST_true(BN_mod_exp_mont(r, a, zero, BN_value_one(), in test_expmodzero()
2337 || !TEST_true(BN_mod_exp_mont_consttime(r, a, zero, in test_expmodzero()
2341 || !TEST_true(BN_mod_exp_mont_word(r, 42, zero, in test_expmodzero()
2367 || !TEST_true(BN_set_word(a, 1)) in test_expmodone()
2368 || !TEST_true(BN_set_word(p, 0)) in test_expmodone()
2369 || !TEST_true(BN_set_word(m, 1))) in test_expmodone()
2374 if (!TEST_true(BN_mod_exp(r, a, p, m, NULL)) in test_expmodone()
2376 || !TEST_true(BN_mod_exp_mont(r, a, p, m, NULL, NULL)) in test_expmodone()
2378 || !TEST_true(BN_mod_exp_mont_consttime(r, a, p, m, NULL, NULL)) in test_expmodone()
2380 || !TEST_true(BN_mod_exp_mont_word(r, 1, p, m, NULL, NULL)) in test_expmodone()
2382 || !TEST_true(BN_mod_exp_simple(r, a, p, m, NULL)) in test_expmodone()
2384 || !TEST_true(BN_mod_exp_recp(r, a, p, m, NULL)) in test_expmodone()
2414 if (!TEST_true(BN_generate_prime_ex(r, kBits, 0, in test_smallprime()
2439 if (!TEST_true(BN_generate_prime_ex(r, kBits, 1, in test_smallsafeprime()
2463 if (!TEST_true(BN_set_word(r, primes[i])) in test_is_prime()
2487 if (!TEST_true(BN_set_word(r, not_primes[i])) in test_not_prime()
2572 if (!TEST_true(test_ctx_set_ct_flag(c)) in test_ctx_consttime_flag()
2573 || !TEST_true(test_ctx_check_ct_flag(c))) in test_ctx_consttime_flag()
2594 if (!TEST_true(BN_generate_prime_ex(a, 1024, 0, NULL, NULL, NULL))) in test_gcd_prime()
2597 if (!TEST_true(BN_generate_prime_ex(b, 1024, 0, in test_gcd_prime()
2599 || !TEST_true(BN_gcd(gcd, a, b, ctx)) in test_gcd_prime()
2600 || !TEST_true(BN_is_one(gcd))) in test_gcd_prime()
2831 || !TEST_true(BN_dec2bn(&base, test->base)) in test_mod_exp()
2832 || !TEST_true(BN_dec2bn(&exponent, test->exp)) in test_mod_exp()
2833 || !TEST_true(BN_dec2bn(&modulo, test->mod))) in test_mod_exp()
2865 || !TEST_true(BN_dec2bn(&base, test->base)) in test_mod_exp_consttime()
2866 || !TEST_true(BN_dec2bn(&exponent, test->exp)) in test_mod_exp_consttime()
2867 || !TEST_true(BN_dec2bn(&modulo, test->mod))) in test_mod_exp_consttime()
2913 if (!TEST_true(BN_one(exp_a1)) in test_mod_exp2_mont()
2914 || !TEST_true(BN_one(exp_p1)) in test_mod_exp2_mont()
2915 || !TEST_true(BN_one(exp_a2)) in test_mod_exp2_mont()
2916 || !TEST_true(BN_one(exp_p2))) in test_mod_exp2_mont()
2946 if (!TEST_true(BN_dec2bn(&a, "5193817943"))) in test_mod_inverse()
2948 if (!TEST_true(BN_dec2bn(&b, "3259122431"))) in test_mod_inverse()
2982 if (!TEST_true(BN_dec2bn(&a, "15"))) in test_mod_exp_alias()
2984 if (!TEST_true(BN_dec2bn(&b, "10"))) in test_mod_exp_alias()
2986 if (!TEST_true(BN_dec2bn(&c, "39"))) in test_mod_exp_alias()