Home
last modified time | relevance | path

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

/third_party/mbedtls/library/
Drsa_alt_helpers.c91 if (mbedtls_mpi_cmp_int(N, 0) <= 0 || in mbedtls_rsa_deduce_primes()
92 mbedtls_mpi_cmp_int(D, 1) <= 0 || in mbedtls_rsa_deduce_primes()
94 mbedtls_mpi_cmp_int(E, 1) <= 0 || in mbedtls_rsa_deduce_primes()
133 if (mbedtls_mpi_cmp_int(P, 1) != 0) { in mbedtls_rsa_deduce_primes()
146 if (mbedtls_mpi_cmp_int(&K, 1) == 0) { in mbedtls_rsa_deduce_primes()
153 if (mbedtls_mpi_cmp_int(P, 1) == 1 && in mbedtls_rsa_deduce_primes()
176 if (mbedtls_mpi_cmp_int(&K, 1) != 0) { in mbedtls_rsa_deduce_primes()
202 if (D == NULL || mbedtls_mpi_cmp_int(D, 0) != 0) { in mbedtls_rsa_deduce_private_exponent()
206 if (mbedtls_mpi_cmp_int(P, 1) <= 0 || in mbedtls_rsa_deduce_private_exponent()
207 mbedtls_mpi_cmp_int(Q, 1) <= 0 || in mbedtls_rsa_deduce_private_exponent()
[all …]
Drsa.c159 if (mbedtls_mpi_cmp_int(&ctx->N, 0) <= 0 || in rsa_check_context()
169 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context()
171 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0 || in rsa_check_context()
182 if (mbedtls_mpi_cmp_int(&ctx->E, 0) <= 0) { in rsa_check_context()
189 if (is_priv && mbedtls_mpi_cmp_int(&ctx->D, 0) <= 0) { in rsa_check_context()
194 (mbedtls_mpi_cmp_int(&ctx->DP, 0) <= 0 || in rsa_check_context()
195 mbedtls_mpi_cmp_int(&ctx->DQ, 0) <= 0)) { in rsa_check_context()
205 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context()
206 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0)) { in rsa_check_context()
215 mbedtls_mpi_cmp_int(&ctx->QP, 0) <= 0) { in rsa_check_context()
[all …]
Dbignum.c481 } while (mbedtls_mpi_cmp_int(X, 0) != 0); in mpi_write_hlp()
908 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z) in mbedtls_mpi_cmp_int() function
1352 if (mbedtls_mpi_cmp_int(B, 0) == 0) { in mbedtls_mpi_div_mpi()
1432 if (mbedtls_mpi_cmp_int(&X, 0) < 0) { in mbedtls_mpi_div_mpi()
1450 if (mbedtls_mpi_cmp_int(R, 0) == 0) { in mbedtls_mpi_div_mpi()
1493 if (mbedtls_mpi_cmp_int(B, 0) < 0) { in mbedtls_mpi_mod_mpi()
1499 while (mbedtls_mpi_cmp_int(R, 0) < 0) { in mbedtls_mpi_mod_mpi()
1671 if (mbedtls_mpi_cmp_int(N, 0) <= 0 || (N->p[0] & 1) == 0) { in mbedtls_mpi_exp_mod()
1675 if (mbedtls_mpi_cmp_int(E, 0) < 0) { in mbedtls_mpi_exp_mod()
2019 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()
1009 if ((N->s < 0 && mbedtls_mpi_cmp_int(N, 0) != 0) || in ecp_modp()
1017 while (N->s < 0 && mbedtls_mpi_cmp_int(N, 0) != 0) { in ecp_modp()
1074 while ((N)->s < 0 && mbedtls_mpi_cmp_int((N), 0) != 0) \
1199 mbedtls_mpi_cmp_int(X, c)
1213 unsigned char nonzero = mbedtls_mpi_cmp_int((X), 0) != 0; \
2738 if (mbedtls_mpi_cmp_int(&pt->X, 0) < 0 || in ecp_check_pubkey_sw()
2739 mbedtls_mpi_cmp_int(&pt->Y, 0) < 0 || in ecp_check_pubkey_sw()
2781 if (mbedtls_mpi_cmp_int(m, 0) == 0) { in mbedtls_ecp_mul_shortcuts()
[all …]
Decdsa.c262 if (mbedtls_mpi_cmp_int(d, 1) < 0 || mbedtls_mpi_cmp_mpi(d, &grp->N) >= 0) { in mbedtls_ecdsa_sign_restartable()
321 } while (mbedtls_mpi_cmp_int(pr, 0) == 0); in mbedtls_ecdsa_sign_restartable()
359 } while (mbedtls_mpi_cmp_int(s, 0) == 0); in mbedtls_ecdsa_sign_restartable()
539 if (mbedtls_mpi_cmp_int(r, 1) < 0 || mbedtls_mpi_cmp_mpi(r, &grp->N) >= 0 || in mbedtls_ecdsa_verify_restartable()
540 mbedtls_mpi_cmp_int(s, 1) < 0 || mbedtls_mpi_cmp_mpi(s, &grp->N) >= 0) { in mbedtls_ecdsa_verify_restartable()
Ddhm.c100 if (mbedtls_mpi_cmp_int(param, 2) < 0 || in dhm_check_range()
198 if (mbedtls_mpi_cmp_int(&ctx->P, 0) == 0) { in dhm_make_common()
379 if (mbedtls_mpi_cmp_int(&ctx->Vi, 1) != 0) { in dhm_update_blinding()
Dpkparse.c704 if (mbedtls_mpi_cmp_int(X, 0) == 0) { in asn1_get_nonzero_mpi()
Dpsa_crypto.c1202 if (mbedtls_mpi_cmp_int(&mpi, 65537) == 0) { in psa_get_rsa_public_exponent()
/third_party/mbedtls/tests/suites/
Dtest_suite_bignum.function400 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, input_A) == result_CMP);
648 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, 0) == 0);
1282 /* Test mbedtls_mpi_cmp_int(): -p == -p */
1283 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 0);
1285 /* Test mbedtls_mpi_cmp_int(): -(p+1) < -p */
1287 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), -1);
1289 /* Test mbedtls_mpi_cmp_int(): -(p-1) > -p */
1291 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 1);
1296 TEST_EQUAL(mbedtls_mpi_cmp_int(&X, -1), 0);
1301 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.data175 Base test mbedtls_mpi_cmp_int #1
178 Base test mbedtls_mpi_cmp_int #2
181 Base test mbedtls_mpi_cmp_int #3
184 Base test mbedtls_mpi_cmp_int (Negative values) #1
187 Base test mbedtls_mpi_cmp_int (Negative values) #2
190 Base test mbedtls_mpi_cmp_int (Negative values) #3
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_ecp.function646 TEST_ASSERT(mbedtls_mpi_cmp_int(&Y, 0) == 0);
648 TEST_ASSERT(mbedtls_mpi_cmp_int(&Z, 1) == 0);
649 TEST_ASSERT(mbedtls_mpi_cmp_int(&P.Z, 1) == 0);
Dtest_suite_asn1parse.function346 TEST_EQUAL(mbedtls_mpi_cmp_int(&actual_mpi, 0), 0);
/third_party/mbedtls/tests/src/
Dbignum_helpers.c136 if (mbedtls_mpi_cmp_int(X, 0) == 0) { in mbedtls_test_read_mpi()
/third_party/mbedtls/programs/fuzz/
Dfuzz_pubkey.c58 if (mbedtls_mpi_cmp_int(&ecp->d, 0) != 0) { in LLVMFuzzerTestOneInput()
/third_party/mbedtls/include/mbedtls/
Dbignum.h669 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z);
/third_party/ffmpeg/libavformat/
Drtmpdh.c183 #define bn_cmp_1(bn) mbedtls_mpi_cmp_int(bn, 1)