Home
last modified time | relevance | path

Searched refs:nbits (Results 1 – 19 of 19) sorted by relevance

/mbedtls-development/programs/pkey/
A Ddh_genprime.c76 int nbits = DFL_BITS; in main() local
100 nbits = atoi( q ); in main()
101 if( nbits < 0 || nbits > MBEDTLS_MPI_MAX_BITS ) in main()
133 if( ( ret = mbedtls_mpi_gen_prime( &P, nbits, 1, in main()
/mbedtls-development/library/
A Dbignum.c2431 nbits = 0; in mbedtls_mpi_exp_mod()
2471 nbits++; in mbedtls_mpi_exp_mod()
2489 nbits = 0; in mbedtls_mpi_exp_mod()
3088 if( nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS ) in mbedtls_mpi_gen_prime()
3100 rounds = ( ( nbits >= 1300 ) ? 2 : ( nbits >= 850 ) ? 3 : in mbedtls_mpi_gen_prime()
3101 ( nbits >= 650 ) ? 4 : ( nbits >= 350 ) ? 8 : in mbedtls_mpi_gen_prime()
3102 ( nbits >= 250 ) ? 12 : ( nbits >= 150 ) ? 18 : 27 ); in mbedtls_mpi_gen_prime()
3110 rounds = ( ( nbits >= 1450 ) ? 4 : ( nbits >= 1150 ) ? 5 : in mbedtls_mpi_gen_prime()
3111 ( nbits >= 1000 ) ? 6 : ( nbits >= 850 ) ? 7 : in mbedtls_mpi_gen_prime()
3112 ( nbits >= 750 ) ? 8 : ( nbits >= 500 ) ? 13 : in mbedtls_mpi_gen_prime()
[all …]
A Dpsa_crypto_ecp.c213 *bits = ecp->grp.nbits + 1; in ecp_import_key()
215 *bits = ecp->grp.nbits; in ecp_import_key()
268 if( data_size < PSA_BITS_TO_BYTES( ecp->grp.nbits ) ) in mbedtls_psa_ecp_export_key()
274 PSA_BITS_TO_BYTES( ecp->grp.nbits ) ) ); in mbedtls_psa_ecp_export_key()
276 *data_length = PSA_BITS_TO_BYTES( ecp->grp.nbits ); in mbedtls_psa_ecp_export_key()
A Decdsa.c231 size_t n_size = ( grp->nbits + 7 ) / 8; in derive_mpi()
235 if( use_size * 8 > grp->nbits ) in derive_mpi()
236 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( x, use_size * 8 - grp->nbits ) ); in derive_mpi()
439 size_t grp_len = ( grp->nbits + 7 ) / 8; in ecdsa_sign_det_restartable()
A Drsa.c555 unsigned int nbits, int exponent ) in mbedtls_rsa_gen_key() argument
568 if( nbits > 1024 ) in mbedtls_rsa_gen_key()
575 if( nbits < 128 || exponent < 3 || nbits % 2 != 0 ) in mbedtls_rsa_gen_key()
591 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, in mbedtls_rsa_gen_key()
594 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1, in mbedtls_rsa_gen_key()
599 if( mbedtls_mpi_bitlen( &H ) <= ( ( nbits >= 200 ) ? ( ( nbits >> 1 ) - 99 ) : 0 ) ) in mbedtls_rsa_gen_key()
621 … if( mbedtls_mpi_bitlen( &ctx->D ) <= ( ( nbits + 1 ) / 2 ) ) // (FIPS 186-4 §B.3.1 criterion 3(a)) in mbedtls_rsa_gen_key()
A Decp.c537 grp->nbits = 0; in mbedtls_ecp_group_init()
2072 w = grp->nbits >= 384 ? 5 : 4; in ecp_pick_window_size()
2095 if( w >= grp->nbits ) in ecp_pick_window_size()
2139 d = ( grp->nbits + w - 1 ) / w; in ecp_mul_comb()
2848 if( mbedtls_mpi_size( &pt->X ) > ( grp->nbits + 7 ) / 8 ) in ecp_check_pubkey_mx()
2900 mbedtls_mpi_bitlen( d ) - 1 != grp->nbits ) /* mbedtls_mpi_bitlen is one-based! */ in mbedtls_ecp_check_privkey()
2904 if( grp->nbits == 254 && mbedtls_mpi_get_bit( d, 2 ) != 0 ) in mbedtls_ecp_check_privkey()
2989 return( mbedtls_ecp_gen_privkey_mx( grp->nbits, d, f_rng, p_rng ) ); in mbedtls_ecp_gen_privkey()
3268 MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( m, grp->nbits, 1 ) ); in self_test_adjust_exponent()
3272 mbedtls_mpi_set_bit( m, grp->nbits - 1, in self_test_adjust_exponent()
A Dpkparse.c372 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in pk_group_from_specified()
400 if( grp->pbits == ref.pbits && grp->nbits == ref.nbits && in pk_group_id_from_group()
A Dpk.c624 d_len = ( ec->grp.nbits + 7 ) / 8; in mbedtls_pk_wrap_as_opaque()
A Dpk_wrap.c575 const size_t signature_part_size = ( ctx->grp.nbits + 7 ) / 8; in ecdsa_verify_wrap()
A Decp_curves.c4554 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in ecp_group_load()
4666 grp->nbits = 254; in ecp_use_curve25519()
4720 grp->nbits = 447; in ecp_use_curve448()
A Dssl_cli.c2501 if( ssl->handshake->ecdh_ctx.grp.nbits < 163 || in ssl_check_server_ecdh_params()
2502 ssl->handshake->ecdh_ctx.grp.nbits > 521 ) in ssl_check_server_ecdh_params()
/mbedtls-development/tests/include/alt-dummy/
A Decp_alt.h31 const size_t nbits; member
/mbedtls-development/tests/suites/
A Dtest_suite_ecdh.function126 if( grp.nbits % 8 != 0 )
128 unsigned char shift = 8 - ( grp.nbits % 8 );
144 if( grp.nbits % 8 != 0 )
146 unsigned char shift = 8 - ( grp.nbits % 8 );
271 TEST_ASSERT( grp.nbits % 8 == 0 );
A Dtest_suite_ecdsa.function104 if( grp.nbits % 8 != 0 )
106 unsigned char shift = 8 - ( grp.nbits % 8 );
/mbedtls-development/include/mbedtls/
A Drsa.h445 unsigned int nbits, int exponent );
A Dbignum.h1010 int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags,
A Decp.h238 size_t nbits; /*!< For Short Weierstrass: The number of bits in \p P. member
/mbedtls-development/docs/architecture/
A Dalternative-implementations.md51 * ECP: `mbedtls_ecp_group` must have the fields `id`, `P`, `A`, `B`, `G`, `N`, `pbits` and `nbits`.
/mbedtls-development/
A DChangeLog4546 * Updated rsa_gen_key() so that ctx->N is always nbits in size

Completed in 55 milliseconds