Lines Matching refs:P

576                        const mbedtls_mpi *P, const mbedtls_mpi *Q,  in mbedtls_rsa_import()  argument
582 (P != NULL && (ret = mbedtls_mpi_copy(&ctx->P, P)) != 0) || in mbedtls_rsa_import()
598 unsigned char const *P, size_t P_len, in mbedtls_rsa_import_raw() argument
610 if (P != NULL) { in mbedtls_rsa_import_raw()
611 MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&ctx->P, P, P_len)); in mbedtls_rsa_import_raw()
670 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context()
671 mbedtls_mpi_get_bit(&ctx->P, 0) == 0 || in rsa_check_context()
706 (mbedtls_mpi_cmp_int(&ctx->P, 0) <= 0 || in rsa_check_context()
734 have_P = (mbedtls_mpi_cmp_int(&ctx->P, 0) != 0); in mbedtls_rsa_complete()
772 if ((ret = mbedtls_mpi_mul_mpi(&ctx->N, &ctx->P, in mbedtls_rsa_complete()
786 &ctx->P, &ctx->Q); in mbedtls_rsa_complete()
792 if ((ret = mbedtls_rsa_deduce_private_exponent(&ctx->P, in mbedtls_rsa_complete()
807 ret = mbedtls_rsa_deduce_crt(&ctx->P, &ctx->Q, &ctx->D, in mbedtls_rsa_complete()
824 unsigned char *P, size_t P_len, in mbedtls_rsa_export_raw() argument
835 mbedtls_mpi_cmp_int(&ctx->P, 0) != 0 && in mbedtls_rsa_export_raw()
843 if (P != NULL || Q != NULL || D != NULL) { in mbedtls_rsa_export_raw()
853 if (P != NULL) { in mbedtls_rsa_export_raw()
854 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&ctx->P, P, P_len)); in mbedtls_rsa_export_raw()
875 mbedtls_mpi *N, mbedtls_mpi *P, mbedtls_mpi *Q, in mbedtls_rsa_export() argument
884 mbedtls_mpi_cmp_int(&ctx->P, 0) != 0 && in mbedtls_rsa_export()
892 if (P != NULL || Q != NULL || D != NULL) { in mbedtls_rsa_export()
901 (P != NULL && (ret = mbedtls_mpi_copy(P, &ctx->P)) != 0) || in mbedtls_rsa_export()
926 mbedtls_mpi_cmp_int(&ctx->P, 0) != 0 && in mbedtls_rsa_export_crt()
943 if ((ret = mbedtls_rsa_deduce_crt(&ctx->P, &ctx->Q, &ctx->D, in mbedtls_rsa_export_crt()
1087 MBEDTLS_MPI_CHK(mbedtls_mpi_gen_prime(&ctx->P, nbits >> 1, in mbedtls_rsa_gen_key()
1094 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(&H, &ctx->P, &ctx->Q)); in mbedtls_rsa_gen_key()
1101 mbedtls_mpi_swap(&ctx->P, &ctx->Q); in mbedtls_rsa_gen_key()
1105 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&ctx->P, &ctx->P, 1)); in mbedtls_rsa_gen_key()
1107 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&H, &ctx->P, &ctx->Q)); in mbedtls_rsa_gen_key()
1116 MBEDTLS_MPI_CHK(mbedtls_mpi_gcd(&G, &ctx->P, &ctx->Q)); in mbedtls_rsa_gen_key()
1128 MBEDTLS_MPI_CHK(mbedtls_mpi_add_int(&ctx->P, &ctx->P, 1)); in mbedtls_rsa_gen_key()
1131 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&ctx->N, &ctx->P, &ctx->Q)); in mbedtls_rsa_gen_key()
1141 MBEDTLS_MPI_CHK(mbedtls_rsa_deduce_crt(&ctx->P, &ctx->Q, &ctx->D, in mbedtls_rsa_gen_key()
1200 if (mbedtls_rsa_validate_params(&ctx->N, &ctx->P, &ctx->Q, in mbedtls_rsa_check_privkey()
1206 else if (mbedtls_rsa_validate_crt(&ctx->P, &ctx->Q, &ctx->D, in mbedtls_rsa_check_privkey()
1500 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&P1, &ctx->P, 1)); in mbedtls_rsa_private()
1542 MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod(&TP, &T, &DP_blind, &ctx->P, &ctx->RP)); in mbedtls_rsa_private()
1550 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&T, &TP, &ctx->P)); in mbedtls_rsa_private()
1961 if( ctx->P.n == 0 ) in mbedtls_rsa_rsaes_oaep_decrypt()
2225 if (ctx->P.n == 0) in rsa_rsassa_pss_sign_no_mode_check()
2791 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&dst->P, &src->P)); in mbedtls_rsa_copy()
2832 mbedtls_mpi_free(&ctx->P); in mbedtls_rsa_free()