Lines Matching refs:P

64                      mbedtls_mpi *P, mbedtls_mpi *Q )  in mbedtls_rsa_deduce_primes()  argument
88 if( P == NULL || Q == NULL || P->p != NULL || Q->p != NULL ) in mbedtls_rsa_deduce_primes()
134 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
135 if( mbedtls_mpi_cmp_int( P, 1 ) != 0 ) in mbedtls_rsa_deduce_primes()
152 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
154 if( mbedtls_mpi_cmp_int( P, 1 ) == 1 && in mbedtls_rsa_deduce_primes()
155 mbedtls_mpi_cmp_mpi( P, N ) == -1 ) in mbedtls_rsa_deduce_primes()
162 MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( Q, NULL, N, P ) ); in mbedtls_rsa_deduce_primes()
197 int mbedtls_rsa_deduce_private_exponent( mbedtls_mpi const *P, in mbedtls_rsa_deduce_private_exponent() argument
208 if( mbedtls_mpi_cmp_int( P, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
219 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &K, P, 1 ) ); in mbedtls_rsa_deduce_private_exponent()
243 int mbedtls_rsa_validate_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q, in mbedtls_rsa_validate_crt() argument
256 if( P == NULL ) in mbedtls_rsa_validate_crt()
262 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &K, P, 1 ) ); in mbedtls_rsa_validate_crt()
296 if( P == NULL || Q == NULL ) in mbedtls_rsa_validate_crt()
304 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &K, &K, P ) ); in mbedtls_rsa_validate_crt()
331 int mbedtls_rsa_validate_params( const mbedtls_mpi *N, const mbedtls_mpi *P, in mbedtls_rsa_validate_params() argument
353 if( f_rng != NULL && P != NULL && in mbedtls_rsa_validate_params()
354 ( ret = mbedtls_mpi_is_prime_ext( P, 50, f_rng, p_rng ) ) != 0 ) in mbedtls_rsa_validate_params()
375 if( P != NULL && Q != NULL && N != NULL ) in mbedtls_rsa_validate_params()
377 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &K, P, Q ) ); in mbedtls_rsa_validate_params()
406 if( P != NULL && Q != NULL && D != NULL && E != NULL ) in mbedtls_rsa_validate_params()
408 if( mbedtls_mpi_cmp_int( P, 1 ) <= 0 || in mbedtls_rsa_validate_params()
418 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &L, P, 1 ) ); in mbedtls_rsa_validate_params()
452 int mbedtls_rsa_deduce_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q, in mbedtls_rsa_deduce_crt() argument
463 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &K, P, 1 ) ); in mbedtls_rsa_deduce_crt()
477 MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( QP, Q, P ) ); in mbedtls_rsa_deduce_crt()