| /external/mbedtls/library/ |
| D | rsa_alt_helpers.c | 79 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 …]
|
| D | rsa.c | 292 if (mbedtls_mpi_cmp_int(&ctx->N, 0) <= 0 || in rsa_check_context() 302 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context() 304 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0 || in rsa_check_context() 315 if (mbedtls_mpi_cmp_int(&ctx->E, 0) <= 0) { in rsa_check_context() 322 if (is_priv && mbedtls_mpi_cmp_int(&ctx->D, 0) <= 0) { in rsa_check_context() 327 (mbedtls_mpi_cmp_int(&ctx->DP, 0) <= 0 || in rsa_check_context() 328 mbedtls_mpi_cmp_int(&ctx->DQ, 0) <= 0)) { in rsa_check_context() 338 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context() 339 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0)) { in rsa_check_context() 348 mbedtls_mpi_cmp_int(&ctx->QP, 0) <= 0) { in rsa_check_context() [all …]
|
| D | bignum.c | 616 } while (mbedtls_mpi_cmp_int(X, 0) != 0); in mpi_write_hlp() 1014 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z) in mbedtls_mpi_cmp_int() function 1453 if (mbedtls_mpi_cmp_int(B, 0) == 0) { in mbedtls_mpi_div_mpi() 1533 if (mbedtls_mpi_cmp_int(&X, 0) < 0) { in mbedtls_mpi_div_mpi() 1551 if (mbedtls_mpi_cmp_int(R, 0) == 0) { in mbedtls_mpi_div_mpi() 1594 if (mbedtls_mpi_cmp_int(B, 0) < 0) { in mbedtls_mpi_mod_mpi() 1600 while (mbedtls_mpi_cmp_int(R, 0) < 0) { in mbedtls_mpi_mod_mpi() 1770 if (mbedtls_mpi_cmp_int(N, 0) <= 0 || (N->p[0] & 1) == 0) { in mbedtls_mpi_exp_mod() 1774 if (mbedtls_mpi_cmp_int(E, 0) < 0) { in mbedtls_mpi_exp_mod() 2116 while (mbedtls_mpi_cmp_int(&TA, 0) != 0) { in mbedtls_mpi_gcd() [all …]
|
| D | ecp.c | 655 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) \ 1198 mbedtls_mpi_cmp_int(X, c) 1212 unsigned char nonzero = mbedtls_mpi_cmp_int((X), 0) != 0; \ 2741 if (mbedtls_mpi_cmp_int(&pt->X, 0) < 0 || in ecp_check_pubkey_sw() 2742 mbedtls_mpi_cmp_int(&pt->Y, 0) < 0 || in ecp_check_pubkey_sw() 2785 if (mbedtls_mpi_cmp_int(m, 0) == 0) { in mbedtls_ecp_mul_shortcuts() [all …]
|
| D | ecdsa.c | 263 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()
|
| D | dhm.c | 88 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()
|
| /external/openthread/third_party/mbedtls/repo/library/ |
| D | rsa_internal.c | 79 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 …]
|
| D | rsa.c | 147 if (mbedtls_mpi_cmp_int(&ctx->N, 0) <= 0 || in rsa_check_context() 157 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context() 159 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0 || in rsa_check_context() 170 if (mbedtls_mpi_cmp_int(&ctx->E, 0) <= 0) { in rsa_check_context() 177 if (is_priv && mbedtls_mpi_cmp_int(&ctx->D, 0) <= 0) { in rsa_check_context() 182 (mbedtls_mpi_cmp_int(&ctx->DP, 0) <= 0 || in rsa_check_context() 183 mbedtls_mpi_cmp_int(&ctx->DQ, 0) <= 0)) { in rsa_check_context() 193 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context() 194 mbedtls_mpi_cmp_int(&ctx->Q, 0) <= 0)) { in rsa_check_context() 203 mbedtls_mpi_cmp_int(&ctx->QP, 0) <= 0) { in rsa_check_context() [all …]
|
| D | bignum.c | 517 } while (mbedtls_mpi_cmp_int(X, 0) != 0); in mpi_write_hlp() 1133 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z) in mbedtls_mpi_cmp_int() function 1689 if (mbedtls_mpi_cmp_int(B, 0) == 0) { in mbedtls_mpi_div_mpi() 1769 if (mbedtls_mpi_cmp_int(&X, 0) < 0) { in mbedtls_mpi_div_mpi() 1787 if (mbedtls_mpi_cmp_int(R, 0) == 0) { in mbedtls_mpi_div_mpi() 1830 if (mbedtls_mpi_cmp_int(B, 0) < 0) { in mbedtls_mpi_mod_mpi() 1836 while (mbedtls_mpi_cmp_int(R, 0) < 0) { in mbedtls_mpi_mod_mpi() 2055 if (mbedtls_mpi_cmp_int(N, 0) <= 0 || (N->p[0] & 1) == 0) { in mbedtls_mpi_exp_mod() 2059 if (mbedtls_mpi_cmp_int(E, 0) < 0) { in mbedtls_mpi_exp_mod() 2399 while (mbedtls_mpi_cmp_int(&TA, 0) != 0) { in mbedtls_mpi_gcd() [all …]
|
| D | ecp.c | 806 return mbedtls_mpi_cmp_int(&pt->Z, 0) == 0; in mbedtls_ecp_is_zero() 881 if (mbedtls_mpi_cmp_int(&P->Z, 0) == 0) { in mbedtls_ecp_point_write_binary() 1174 if ((N->s < 0 && mbedtls_mpi_cmp_int(N, 0) != 0) || in ecp_modp() 1182 while (N->s < 0 && mbedtls_mpi_cmp_int(N, 0) != 0) { in ecp_modp() 1238 while ((N).s < 0 && mbedtls_mpi_cmp_int(&(N), 0) != 0) \ 1314 if (mbedtls_mpi_cmp_int(&pt->Z, 0) == 0) { in ecp_normalize_jac() 1474 nonzero = mbedtls_mpi_cmp_int(&Q->Y, 0) != 0; in ecp_safe_invert_jac() 1532 if (mbedtls_mpi_cmp_int(&grp->A, 0) != 0) { in ecp_double_jac() 1616 if (mbedtls_mpi_cmp_int(&P->Z, 0) == 0) { in ecp_add_mixed() 1620 if (Q->Z.p != NULL && mbedtls_mpi_cmp_int(&Q->Z, 0) == 0) { in ecp_add_mixed() [all …]
|
| D | ecdsa.c | 269 if (mbedtls_mpi_cmp_int(d, 1) < 0 || mbedtls_mpi_cmp_mpi(d, &grp->N) >= 0) { in ecdsa_sign_restartable() 328 } while (mbedtls_mpi_cmp_int(pr, 0) == 0); in ecdsa_sign_restartable() 366 } while (mbedtls_mpi_cmp_int(s, 0) == 0); in ecdsa_sign_restartable() 619 if (mbedtls_mpi_cmp_int(r, 1) < 0 || mbedtls_mpi_cmp_mpi(r, &grp->N) >= 0 || in ecdsa_verify_restartable() 620 mbedtls_mpi_cmp_int(s, 1) < 0 || mbedtls_mpi_cmp_mpi(s, &grp->N) >= 0) { in ecdsa_verify_restartable()
|
| D | dhm.c | 93 if (mbedtls_mpi_cmp_int(param, 2) < 0 || in dhm_check_range() 157 if (mbedtls_mpi_cmp_int(&ctx->P, 0) == 0) { in dhm_make_common() 353 if (mbedtls_mpi_cmp_int(&ctx->Vi, 1) != 0) { in dhm_update_blinding()
|
| /external/mbedtls/tests/suites/ |
| D | test_suite_bignum.function | 400 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, input_A) == result_CMP); 648 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, 0) == 0); 1249 /* Test mbedtls_mpi_cmp_int(): -p == -p */ 1250 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 0); 1252 /* Test mbedtls_mpi_cmp_int(): -(p+1) < -p */ 1254 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), -1); 1256 /* Test mbedtls_mpi_cmp_int(): -(p-1) > -p */ 1258 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 1); 1263 TEST_EQUAL(mbedtls_mpi_cmp_int(&X, -1), 0); 1268 TEST_EQUAL(mbedtls_mpi_cmp_int(&X, most_negative), 0); [all …]
|
| D | test_suite_dhm.function | 62 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->X, 1) > 0); 65 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->GX, 1) > 0);
|
| D | test_suite_bignum.misc.data | 175 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
|
| D | test_suite_bignum_random.function | 319 TEST_ASSERT(mbedtls_mpi_cmp_int(&R, min) >= 0); 398 TEST_ASSERT(mbedtls_mpi_cmp_int(&result, min) >= 0);
|
| /external/openthread/third_party/mbedtls/repo/tests/suites/ |
| D | test_suite_bignum.function | 248 mbedtls_mpi_cmp_int(NULL, 42)); 658 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, input_A) == result_CMP); 906 TEST_ASSERT(mbedtls_mpi_cmp_int(&X, 0) == 0); 1519 TEST_ASSERT(mbedtls_mpi_cmp_int(&result, min) >= 0); 1593 TEST_ASSERT(mbedtls_mpi_cmp_int(&result, min) >= 0); 1660 /* Test mbedtls_mpi_cmp_int(): -p == -p */ 1661 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), 0); 1663 /* Test mbedtls_mpi_cmp_int(): -(p+1) < -p */ 1665 TEST_EQUAL(mbedtls_mpi_cmp_int(&A, most_negative), -1); 1667 /* Test mbedtls_mpi_cmp_int(): -(p-1) > -p */ [all …]
|
| D | test_suite_dhm.function | 45 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->X, 1) > 0); 48 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->GX, 1) > 0);
|
| D | test_suite_bignum.misc.data | 172 Base test mbedtls_mpi_cmp_int #1 175 Base test mbedtls_mpi_cmp_int #2 178 Base test mbedtls_mpi_cmp_int #3 181 Base test mbedtls_mpi_cmp_int (Negative values) #1 184 Base test mbedtls_mpi_cmp_int (Negative values) #2 187 Base test mbedtls_mpi_cmp_int (Negative values) #3
|
| /external/openthread/third_party/mbedtls/repo/programs/fuzz/ |
| D | fuzz_pubkey.c | 62 if (mbedtls_mpi_cmp_int(&ecp->d, 0) != 0) { in LLVMFuzzerTestOneInput()
|
| /external/mbedtls/programs/fuzz/ |
| D | fuzz_pubkey.c | 64 if (mbedtls_mpi_cmp_int(&ecp->d, 0) != 0) { in LLVMFuzzerTestOneInput()
|
| /external/mbedtls/tests/src/ |
| D | bignum_helpers.c | 137 if (mbedtls_mpi_cmp_int(X, 0) == 0) { in mbedtls_test_read_mpi()
|
| /external/mbedtls/include/mbedtls/ |
| D | bignum.h | 682 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z);
|
| /external/openthread/third_party/mbedtls/repo/include/mbedtls/ |
| D | bignum.h | 660 int mbedtls_mpi_cmp_int(const mbedtls_mpi *X, mbedtls_mpi_sint z);
|
| /external/openthread/third_party/mbedtls/repo/tests/src/ |
| D | helpers.c | 453 if (mbedtls_mpi_cmp_int(X, 0) == 0) { in mbedtls_test_read_mpi()
|