Lines Matching refs:N
128 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->N, &ctx->P, &ctx->Q ) ); in mbedtls_rsa_gen_key()
129 if( mbedtls_mpi_bitlen( &ctx->N ) != nbits ) in mbedtls_rsa_gen_key()
153 ctx->len = ( mbedtls_mpi_bitlen( &ctx->N ) + 7 ) >> 3; in mbedtls_rsa_gen_key()
175 if( !ctx->N.p || !ctx->E.p ) in mbedtls_rsa_check_pubkey()
178 if( ( ctx->N.p[0] & 1 ) == 0 || in mbedtls_rsa_check_pubkey()
182 if( mbedtls_mpi_bitlen( &ctx->N ) < 128 || in mbedtls_rsa_check_pubkey()
183 mbedtls_mpi_bitlen( &ctx->N ) > MBEDTLS_MPI_MAX_BITS ) in mbedtls_rsa_check_pubkey()
187 mbedtls_mpi_cmp_mpi( &ctx->E, &ctx->N ) >= 0 ) in mbedtls_rsa_check_pubkey()
229 if( mbedtls_mpi_cmp_mpi( &PQ, &ctx->N ) != 0 || in mbedtls_rsa_check_privkey()
266 if( mbedtls_mpi_cmp_mpi( &pub->N, &prv->N ) != 0 || in mbedtls_rsa_check_pub_priv()
295 if( mbedtls_mpi_cmp_mpi( &T, &ctx->N ) >= 0 ) in mbedtls_rsa_public()
302 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T, &T, &ctx->E, &ctx->N, &ctx->RN ) ); in mbedtls_rsa_public()
334 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->Vi, &ctx->Vi, &ctx->N ) ); in rsa_prepare_blinding()
336 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->Vf, &ctx->Vf, &ctx->N ) ); in rsa_prepare_blinding()
347 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &ctx->Vi, &ctx->Vf, &ctx->N ) ); in rsa_prepare_blinding()
351 MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->Vi, &ctx->Vf, &ctx->N ) ); in rsa_prepare_blinding()
352 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->Vi, &ctx->Vi, &ctx->E, &ctx->N, &ctx->RN ) ); in rsa_prepare_blinding()
384 if( mbedtls_mpi_cmp_mpi( &T, &ctx->N ) >= 0 ) in mbedtls_rsa_private()
398 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &T, &T, &ctx->N ) ); in mbedtls_rsa_private()
402 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T, &T, &ctx->D, &ctx->N, &ctx->RN ) ); in mbedtls_rsa_private()
434 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &T, &T, &ctx->N ) ); in mbedtls_rsa_private()
974 msb = mbedtls_mpi_bitlen( &ctx->N ) - 1; in mbedtls_rsa_rsassa_pss_sign()
1003 msb = mbedtls_mpi_bitlen( &ctx->N ) - 1; in mbedtls_rsa_rsassa_pss_sign()
1242 msb = mbedtls_mpi_bitlen( &ctx->N ) - 1; in mbedtls_rsa_rsassa_pss_verify_ext()
1485 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->N, &src->N ) ); in mbedtls_rsa_copy()
1521 mbedtls_mpi_free( &ctx->E ); mbedtls_mpi_free( &ctx->N ); in mbedtls_rsa_free()
1627 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.N , 16, RSA_N ) ); in mbedtls_rsa_self_test()