Lines Matching refs:N
334 mbedtls_mpi_free( &grp->N ); in mbedtls_ecp_group_free()
663 static int ecp_modp( mbedtls_mpi *N, const mbedtls_ecp_group *grp ) in ecp_modp() argument
668 return( mbedtls_mpi_mod_mpi( N, N, &grp->P ) ); in ecp_modp()
671 if( ( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) || in ecp_modp()
672 mbedtls_mpi_bitlen( N ) > 2 * grp->pbits ) in ecp_modp()
677 MBEDTLS_MPI_CHK( grp->modp( N ) ); in ecp_modp()
680 while( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) in ecp_modp()
681 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &grp->P ) ); in ecp_modp()
683 while( mbedtls_mpi_cmp_mpi( N, &grp->P ) >= 0 ) in ecp_modp()
685 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( N, N, &grp->P ) ); in ecp_modp()
710 #define MOD_MUL( N ) do { MBEDTLS_MPI_CHK( ecp_modp( &N, grp ) ); INC_MUL_COUNT } \ argument
717 #define MOD_SUB( N ) \ argument
718 while( N.s < 0 && mbedtls_mpi_cmp_int( &N, 0 ) != 0 ) \
719 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &N, &N, &grp->P ) )
726 #define MOD_ADD( N ) \ argument
727 while( mbedtls_mpi_cmp_mpi( &N, &grp->P ) >= 0 ) \
728 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( &N, &N, &grp->P ) )
1325 if( mbedtls_mpi_get_bit( &grp->N, 0 ) != 1 ) in ecp_mul_comb()
1392 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &mm, &grp->N, m ) ); in ecp_mul_comb()
1802 mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ) in mbedtls_ecp_check_privkey()
1881 mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ); in mbedtls_ecp_gen_keypair_base()