Home
last modified time | relevance | path

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

/net-tools-3.7.0/mbedtls-2.4.0/programs/pkey/
Ddh_genprime.c77 int nbits = DFL_BITS; in main() local
101 nbits = atoi( q ); in main()
102 if( nbits < 0 || nbits > MBEDTLS_MPI_MAX_BITS ) in main()
134 if( ( ret = mbedtls_mpi_gen_prime( &P, nbits, 1, in main()
/net-tools-3.7.0/mbedtls-2.4.0/library/
Decdsa.c53 size_t n_size = ( grp->nbits + 7 ) / 8; in derive_mpi()
57 if( use_size * 8 > grp->nbits ) in derive_mpi()
58 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( x, use_size * 8 - grp->nbits ) ); in derive_mpi()
120 size_t n_size = ( grp->nbits + 7 ) / 8; in mbedtls_ecdsa_sign()
122 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &t, 8 * n_size - grp->nbits ) ); in mbedtls_ecdsa_sign()
168 size_t grp_len = ( grp->nbits + 7 ) / 8; in mbedtls_ecdsa_sign_det()
Dbignum.c1607 size_t bufsize, nbits; in mbedtls_mpi_exp_mod() local
1708 nbits = 0; in mbedtls_mpi_exp_mod()
1748 nbits++; in mbedtls_mpi_exp_mod()
1749 wbits |= ( ei << ( wsize - nbits ) ); in mbedtls_mpi_exp_mod()
1751 if( nbits == wsize ) in mbedtls_mpi_exp_mod()
1765 nbits = 0; in mbedtls_mpi_exp_mod()
1773 for( i = 0; i < nbits; i++ ) in mbedtls_mpi_exp_mod()
2177 int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag, in mbedtls_mpi_gen_prime() argument
2186 if( nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS ) in mbedtls_mpi_gen_prime()
2191 n = BITS_TO_LIMBS( nbits ); in mbedtls_mpi_gen_prime()
[all …]
Decp.c1333 w = grp->nbits >= 384 ? 5 : 4; in ecp_mul_comb()
1355 if( w >= grp->nbits ) in ecp_mul_comb()
1360 d = ( grp->nbits + w - 1 ) / w; in ecp_mul_comb()
1752 if( mbedtls_mpi_size( &pt->X ) > ( grp->nbits + 7 ) / 8 ) in ecp_check_pubkey_mx()
1791 mbedtls_mpi_bitlen( d ) - 1 != grp->nbits ) /* mbedtls_mpi_bitlen is one-based! */ in mbedtls_ecp_check_privkey()
1822 size_t n_size = ( grp->nbits + 7 ) / 8; in mbedtls_ecp_gen_keypair_base()
1836 if( b > grp->nbits ) in mbedtls_ecp_gen_keypair_base()
1837 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( d, b - grp->nbits ) ); in mbedtls_ecp_gen_keypair_base()
1839 MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( d, grp->nbits, 1 ) ); in mbedtls_ecp_gen_keypair_base()
1866 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( d, 8 * n_size - grp->nbits ) ); in mbedtls_ecp_gen_keypair_base()
Drsa.c97 unsigned int nbits, int exponent ) in mbedtls_rsa_gen_key() argument
102 if( f_rng == NULL || nbits < 128 || exponent < 3 ) in mbedtls_rsa_gen_key()
105 if( nbits % 2 ) in mbedtls_rsa_gen_key()
119 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, 0, in mbedtls_rsa_gen_key()
122 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1, 0, in mbedtls_rsa_gen_key()
129 if( mbedtls_mpi_bitlen( &ctx->N ) != nbits ) in mbedtls_rsa_gen_key()
Dpkparse.c357 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in pk_group_from_specified()
385 if( grp->pbits == ref.pbits && grp->nbits == ref.nbits && in pk_group_id_from_group()
Decp_curves.c594 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in ecp_group_load()
678 grp->nbits = 254; in ecp_use_curve25519()
Dssl_cli.c1924 if( ssl->handshake->ecdh_ctx.grp.nbits < 163 ||
1925 ssl->handshake->ecdh_ctx.grp.nbits > 521 )
/net-tools-3.7.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_ecdh.function68 if( grp.nbits % 8 != 0 )
70 unsigned char shift = 8 - ( grp.nbits % 8 );
84 if( grp.nbits % 8 != 0 )
86 unsigned char shift = 8 - ( grp.nbits % 8 );
Dtest_suite_ecdsa.function71 if( grp.nbits % 8 != 0 )
73 unsigned char shift = 8 - ( grp.nbits % 8 );
/net-tools-3.7.0/mbedtls-2.4.0/include/mbedtls/
Drsa.h168 unsigned int nbits, int exponent );
Decp.h138 size_t nbits; /*!< number of bits in 1. P, or 2. private keys */ member
Dbignum.h702 int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int dh_flag,
/net-tools-3.7.0/mbedtls-2.4.0/
DChangeLog1965 * Updated rsa_gen_key() so that ctx->N is always nbits in size