Lines Matching refs:N
62 int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N, in mbedtls_rsa_deduce_primes() argument
91 if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 || in mbedtls_rsa_deduce_primes()
93 mbedtls_mpi_cmp_mpi( D, N ) >= 0 || in mbedtls_rsa_deduce_primes()
95 mbedtls_mpi_cmp_mpi( E, N ) >= 0 ) in mbedtls_rsa_deduce_primes()
126 if( N->p[0] % 8 == 1 ) in mbedtls_rsa_deduce_primes()
134 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
140 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &K, &K, &T, N, in mbedtls_rsa_deduce_primes()
152 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); 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()
168 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &K, &K, N ) ); in mbedtls_rsa_deduce_primes()
277 int mbedtls_rsa_validate_params( const mbedtls_mpi *N, const mbedtls_mpi *P, in mbedtls_rsa_validate_params() argument
321 if( P != NULL && Q != NULL && N != NULL ) in mbedtls_rsa_validate_params()
324 if( mbedtls_mpi_cmp_int( N, 1 ) <= 0 || in mbedtls_rsa_validate_params()
325 mbedtls_mpi_cmp_mpi( &K, N ) != 0 ) in mbedtls_rsa_validate_params()
336 if( N != NULL && D != NULL && E != NULL ) in mbedtls_rsa_validate_params()
340 mbedtls_mpi_cmp_mpi( D, N ) >= 0 || in mbedtls_rsa_validate_params()
341 mbedtls_mpi_cmp_mpi( E, N ) >= 0 ) in mbedtls_rsa_validate_params()