Home
last modified time | relevance | path

Searched refs:mbedtls_mpi_cmp_int (Results 1 – 15 of 15) sorted by relevance

/mbedtls-latest/library/
Drsa_alt_helpers.c79 if (mbedtls_mpi_cmp_int(N, 0) <= 0 || in mbedtls_rsa_deduce_primes()
80 mbedtls_mpi_cmp_int(D, 1) <= 0 || in mbedtls_rsa_deduce_primes()
82 mbedtls_mpi_cmp_int(E, 1) <= 0 || in mbedtls_rsa_deduce_primes()
121 if (mbedtls_mpi_cmp_int(P, 1) != 0) { in mbedtls_rsa_deduce_primes()
134 if (mbedtls_mpi_cmp_int(&K, 1) == 0) { in mbedtls_rsa_deduce_primes()
141 if (mbedtls_mpi_cmp_int(P, 1) == 1 && in mbedtls_rsa_deduce_primes()
164 if (mbedtls_mpi_cmp_int(&K, 1) != 0) { in mbedtls_rsa_deduce_primes()
190 if (D == NULL || mbedtls_mpi_cmp_int(D, 0) != 0) { in mbedtls_rsa_deduce_private_exponent()
194 if (mbedtls_mpi_cmp_int(P, 1) <= 0 || in mbedtls_rsa_deduce_private_exponent()
195 mbedtls_mpi_cmp_int(Q, 1) <= 0 || in mbedtls_rsa_deduce_private_exponent()
[all …]
Drsa.c72 if (mbedtls_mpi_cmp_int(X, 0) == 0) { in asn1_get_nonzero_mpi()
658 if (mbedtls_mpi_cmp_int(&ctx->N, 0) <= 0 || in rsa_check_context()
668 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context()
670 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0 || in rsa_check_context()
681 if (mbedtls_mpi_cmp_int(&ctx->E, 0) <= 0) { in rsa_check_context()
688 if (is_priv && mbedtls_mpi_cmp_int(&ctx->D, 0) <= 0) { in rsa_check_context()
693 (mbedtls_mpi_cmp_int(&ctx->DP, 0) <= 0 || in rsa_check_context()
694 mbedtls_mpi_cmp_int(&ctx->DQ, 0) <= 0)) { in rsa_check_context()
704 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context()
705 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0)) { in rsa_check_context()
[all …]
Dbignum.c602 } while (mbedtls_mpi_cmp_int(X, 0) != 0); in mpi_write_hlp()
984 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z) in mbedtls_mpi_cmp_int() function
1401 if (mbedtls_mpi_cmp_int(B, 0) == 0) { in mbedtls_mpi_div_mpi()
1481 if (mbedtls_mpi_cmp_int(&X, 0) < 0) { in mbedtls_mpi_div_mpi()
1499 if (mbedtls_mpi_cmp_int(R, 0) == 0) { in mbedtls_mpi_div_mpi()
1538 if (mbedtls_mpi_cmp_int(B, 0) < 0) { in mbedtls_mpi_mod_mpi()
1544 while (mbedtls_mpi_cmp_int(R, 0) < 0) { in mbedtls_mpi_mod_mpi()
1624 if (mbedtls_mpi_cmp_int(N, 0) <= 0 || (N->p[0] & 1) == 0) { in mbedtls_mpi_exp_mod_optionally_safe()
1628 if (mbedtls_mpi_cmp_int(E, 0) < 0) { in mbedtls_mpi_exp_mod_optionally_safe()
1811 while (mbedtls_mpi_cmp_int(&TA, 0) != 0) { in mbedtls_mpi_gcd()
[all …]
Decp.c655 return mbedtls_mpi_cmp_int(&pt->Z, 0) == 0; in mbedtls_ecp_is_zero()
721 if (mbedtls_mpi_cmp_int(&P->Z, 0) == 0) { in mbedtls_ecp_point_write_binary()
1008 if ((N->s < 0 && mbedtls_mpi_cmp_int(N, 0) != 0) || in ecp_modp()
1016 while (N->s < 0 && mbedtls_mpi_cmp_int(N, 0) != 0) { in ecp_modp()
1073 while ((N)->s < 0 && mbedtls_mpi_cmp_int((N), 0) != 0) \
1188 mbedtls_mpi_cmp_int(X, c)
1202 unsigned char nonzero = mbedtls_mpi_cmp_int((X), 0) != 0; \
2731 if (mbedtls_mpi_cmp_int(&pt->X, 0) < 0 || in ecp_check_pubkey_sw()
2732 mbedtls_mpi_cmp_int(&pt->Y, 0) < 0 || in ecp_check_pubkey_sw()
2775 if (mbedtls_mpi_cmp_int(m, 0) == 0) { in mbedtls_ecp_mul_shortcuts()
[all …]
Decdsa.c263 if (mbedtls_mpi_cmp_int(d, 1) < 0 || mbedtls_mpi_cmp_mpi(d, &grp->N) >= 0) { in mbedtls_ecdsa_sign_restartable()
322 } while (mbedtls_mpi_cmp_int(pr, 0) == 0); in mbedtls_ecdsa_sign_restartable()
360 } while (mbedtls_mpi_cmp_int(s, 0) == 0); in mbedtls_ecdsa_sign_restartable()
527 if (mbedtls_mpi_cmp_int(r, 1) < 0 || mbedtls_mpi_cmp_mpi(r, &grp->N) >= 0 || in mbedtls_ecdsa_verify_restartable()
528 mbedtls_mpi_cmp_int(s, 1) < 0 || mbedtls_mpi_cmp_mpi(s, &grp->N) >= 0) { in mbedtls_ecdsa_verify_restartable()
Ddhm.c88 if (mbedtls_mpi_cmp_int(param, 2) < 0 || in dhm_check_range()
186 if (mbedtls_mpi_cmp_int(&ctx->P, 0) == 0) { in dhm_make_common()
367 if (mbedtls_mpi_cmp_int(&ctx->Vi, 1) != 0) { in dhm_update_blinding()
/mbedtls-latest/tests/suites/
Dtest_suite_bignum.function423 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, input_A) == result_CMP);
671 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, 0) == 0);
1311 /* Test mbedtls_mpi_cmp_int(): -p == -p */
1312 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 0);
1314 /* Test mbedtls_mpi_cmp_int(): -(p+1) < -p */
1316 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), -1);
1318 /* Test mbedtls_mpi_cmp_int(): -(p-1) > -p */
1320 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 1);
1325 TEST_EQUAL(mbedtls_mpi_cmp_int(&X, -1), 0);
1330 TEST_EQUAL(mbedtls_mpi_cmp_int(&X, most_negative), 0);
[all …]
Dtest_suite_dhm.function62 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->X, 1) > 0);
65 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->GX, 1) > 0);
Dtest_suite_bignum.misc.data178 Base test mbedtls_mpi_cmp_int #1
181 Base test mbedtls_mpi_cmp_int #2
184 Base test mbedtls_mpi_cmp_int #3
187 Base test mbedtls_mpi_cmp_int (Negative values) #1
190 Base test mbedtls_mpi_cmp_int (Negative values) #2
193 Base test mbedtls_mpi_cmp_int (Negative values) #3
Dtest_suite_ecp.function654 TEST_ASSERT(mbedtls_mpi_cmp_int(&Y, 0) == 0);
656 TEST_ASSERT(mbedtls_mpi_cmp_int(&Z, 1) == 0);
657 TEST_ASSERT(mbedtls_mpi_cmp_int(&P.Z, 1) == 0);
1203 TEST_EQUAL(mbedtls_mpi_cmp_int(&key.Q.X, 1), 0);
1204 TEST_EQUAL(mbedtls_mpi_cmp_int(&key.Q.Y, 2), 0);
1205 TEST_EQUAL(mbedtls_mpi_cmp_int(&key.Q.Z, 3), 0);
Dtest_suite_bignum_random.function319 TEST_ASSERT(mbedtls_mpi_cmp_int(&R, min) >= 0);
398 TEST_ASSERT(mbedtls_mpi_cmp_int(&result, min) >= 0);
Dtest_suite_asn1parse.function346 TEST_EQUAL(mbedtls_mpi_cmp_int(&actual_mpi, 0), 0);
/mbedtls-latest/tests/src/
Dbignum_helpers.c137 if (mbedtls_mpi_cmp_int(X, 0) == 0) { in mbedtls_test_read_mpi()
/mbedtls-latest/programs/fuzz/
Dfuzz_pubkey.c68 if (mbedtls_mpi_cmp_int(&d, 0) != 0) { in LLVMFuzzerTestOneInput()
/mbedtls-latest/include/mbedtls/
Dbignum.h682 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z);