/mbedtls-development/programs/pkey/ |
A D | dh_genprime.c | 76 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 D | bignum.c | 2431 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 D | psa_crypto_ecp.c | 213 *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 D | ecdsa.c | 231 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 D | rsa.c | 555 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 D | ecp.c | 537 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 D | pkparse.c | 372 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 D | pk.c | 624 d_len = ( ec->grp.nbits + 7 ) / 8; in mbedtls_pk_wrap_as_opaque()
|
A D | pk_wrap.c | 575 const size_t signature_part_size = ( ctx->grp.nbits + 7 ) / 8; in ecdsa_verify_wrap()
|
A D | ecp_curves.c | 4554 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 D | ssl_cli.c | 2501 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 D | ecp_alt.h | 31 const size_t nbits; member
|
/mbedtls-development/tests/suites/ |
A D | test_suite_ecdh.function | 126 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 D | test_suite_ecdsa.function | 104 if( grp.nbits % 8 != 0 ) 106 unsigned char shift = 8 - ( grp.nbits % 8 );
|
/mbedtls-development/include/mbedtls/ |
A D | rsa.h | 445 unsigned int nbits, int exponent );
|
A D | bignum.h | 1010 int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags,
|
A D | ecp.h | 238 size_t nbits; /*!< For Short Weierstrass: The number of bits in \p P. member
|
/mbedtls-development/docs/architecture/ |
A D | alternative-implementations.md | 51 * ECP: `mbedtls_ecp_group` must have the fields `id`, `P`, `A`, `B`, `G`, `N`, `pbits` and `nbits`.
|
/mbedtls-development/ |
A D | ChangeLog | 4546 * Updated rsa_gen_key() so that ctx->N is always nbits in size
|