/optee_os-3.20.0/lib/libutils/ext/include/ |
A D | bitstring.h | 52 #define bitstr_size(nbits) \ argument 53 (((nbits) + 7) >> 3) 56 #define bit_alloc(nbits) \ argument 60 #define bit_decl(name, nbits) \ argument 61 ((name)[bitstr_size(nbits)]) 110 #define bit_ffc(name, nbits, value) do { \ argument 112 register int _byte, _nbits = (nbits); \ 123 if (_value >= nbits) \ 129 #define bit_ffs(name, nbits, value) do { \ argument 131 register int _byte, _nbits = (nbits); \ [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/bit/ |
A D | der_length_bit_string.c | 17 int der_length_bit_string(unsigned long nbits, unsigned long *outlen) in der_length_bit_string() argument 25 nbytes = (nbits >> 3) + ((nbits & 7) ? 1 : 0) + 1; in der_length_bit_string()
|
/optee_os-3.20.0/core/tee/ |
A D | fs_dirfile.c | 17 int nbits; member 58 if (idx < dirh->nbits) in maybe_grow_files() 66 bit_nclear(dirh->files, dirh->nbits, idx); in maybe_grow_files() 67 dirh->nbits = idx + 1; in maybe_grow_files() 84 if (idx < dirh->nbits) in clear_file() 90 if (idx < dirh->nbits) in test_file() 198 if (dirh->nbits) { in tee_fs_dirfile_get_tmp() 199 bit_ffc(dirh->files, dirh->nbits, &i); in tee_fs_dirfile_get_tmp() 201 i = dirh->nbits; in tee_fs_dirfile_get_tmp()
|
A D | tadb.c | 33 int nbits; member 147 if (idx < db->nbits) in maybe_grow_files() 155 bit_nclear(db->files, db->nbits, idx); in maybe_grow_files() 156 db->nbits = idx + 1; in maybe_grow_files() 177 if (idx < db->nbits) in clear_file() 187 if (idx < db->nbits) in test_file() 322 if (db->nbits) in populate_files() 367 db->nbits = 0; in populate_files() 401 bit_ffc(ta->db->files, ta->db->nbits, &i); in tee_tadb_ta_create() 403 i = ta->db->nbits; in tee_tadb_ta_create()
|
A D | tee_svc_cryp.c | 1792 int nbits = a->content.ref.length * 8; in get_used_bits() local 1795 bit_ffs(a->content.ref.buffer, nbits, &v); in get_used_bits() 1796 return nbits - v; in get_used_bits()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | bignum.c | 2215 nbits = 0; in mbedtls_mpi_exp_mod() 2255 nbits++; in mbedtls_mpi_exp_mod() 2273 nbits = 0; in mbedtls_mpi_exp_mod() 2896 if( nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS ) in mbedtls_mpi_gen_prime() 2908 rounds = ( ( nbits >= 1300 ) ? 2 : ( nbits >= 850 ) ? 3 : in mbedtls_mpi_gen_prime() 2909 ( nbits >= 650 ) ? 4 : ( nbits >= 350 ) ? 8 : in mbedtls_mpi_gen_prime() 2910 ( nbits >= 250 ) ? 12 : ( nbits >= 150 ) ? 18 : 27 ); in mbedtls_mpi_gen_prime() 2918 rounds = ( ( nbits >= 1450 ) ? 4 : ( nbits >= 1150 ) ? 5 : in mbedtls_mpi_gen_prime() 2919 ( nbits >= 1000 ) ? 6 : ( nbits >= 850 ) ? 7 : in mbedtls_mpi_gen_prime() 2920 ( nbits >= 750 ) ? 8 : ( nbits >= 500 ) ? 13 : in mbedtls_mpi_gen_prime() [all …]
|
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() 436 size_t grp_len = ( grp->nbits + 7 ) / 8; in ecdsa_sign_det_restartable()
|
A D | rsa.c | 523 unsigned int nbits, int exponent ) in mbedtls_rsa_gen_key() argument 536 if( nbits > 1024 ) in mbedtls_rsa_gen_key() 543 if( nbits < 128 || exponent < 3 || nbits % 2 != 0 ) in mbedtls_rsa_gen_key() 559 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, in mbedtls_rsa_gen_key() 562 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1, in mbedtls_rsa_gen_key() 567 if( mbedtls_mpi_bitlen( &H ) <= ( ( nbits >= 200 ) ? ( ( nbits >> 1 ) - 99 ) : 0 ) ) in mbedtls_rsa_gen_key() 589 … 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 | 701 grp->nbits = 0; in mbedtls_ecp_group_init() 2228 w = grp->nbits >= 384 ? 5 : 4; in ecp_pick_window_size() 2246 if( w >= grp->nbits ) in ecp_pick_window_size() 2302 const size_t m_len = ( grp->nbits + 7 ) / 8; in ecp_mul_comb() 2323 d = ( grp->nbits + w - 1 ) / w; in ecp_mul_comb() 2583 const size_t m_len = ( grp->nbits + 7 ) / 8; in ecp_mul_mxz() 3041 if( mbedtls_mpi_size( &pt->X ) > ( grp->nbits + 7 ) / 8 ) in ecp_check_pubkey_mx() 3097 if( grp->nbits == 254 && mbedtls_mpi_get_bit( d, 2 ) != 0 ) in mbedtls_ecp_check_privkey() 3182 return( mbedtls_ecp_gen_privkey_mx( grp->nbits, d, f_rng, p_rng ) ); in mbedtls_ecp_gen_privkey() 3419 MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( m, grp->nbits, 1 ) ); in self_test_adjust_exponent() [all …]
|
A D | pkparse.c | 371 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in pk_group_from_specified() 399 if( grp->pbits == ref.pbits && grp->nbits == ref.nbits && in pk_group_id_from_group()
|
A D | ecp_curves.c | 624 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in ecp_group_load() 726 grp->nbits = 254; in ecp_use_curve25519() 780 grp->nbits = 447; in ecp_use_curve448()
|
A D | pk.c | 617 d_len = ( ec->grp.nbits + 7 ) / 8; in mbedtls_pk_wrap_as_opaque()
|
A D | pk_wrap.c | 558 const size_t signature_part_size = ( ctx->grp.nbits + 7 ) / 8; in ecdsa_verify_wrap()
|
A D | ssl_cli.c | 2704 if( ssl->handshake->ecdh_ctx.grp.nbits < 163 || in ssl_check_server_ecdh_params() 2705 ssl->handshake->ecdh_ctx.grp.nbits > 521 ) in ssl_check_server_ecdh_params()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | rsa.h | 457 unsigned int nbits, int exponent );
|
A D | ecp.h | 275 size_t nbits; /*!< For Short Weierstrass: The number of bits in \p P. member
|
A D | bignum.h | 1048 int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags,
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_pk.h | 691 int der_length_bit_string(unsigned long nbits, unsigned long *outlen);
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/ |
A D | ChangeLog | 4496 * Updated rsa_gen_key() so that ctx->N is always nbits in size
|