/mbedtls-3.5.0/programs/pkey/ |
D | dh_genprime.c | 66 int nbits = DFL_BITS; in main() local 88 nbits = atoi(q); in main() 89 if (nbits < 0 || nbits > MBEDTLS_MPI_MAX_BITS) { in main() 120 if ((ret = mbedtls_mpi_gen_prime(&P, nbits, 1, in main()
|
/mbedtls-3.5.0/library/ |
D | bignum.c | 1658 size_t bufsize, nbits; in mbedtls_mpi_exp_mod() local 1832 nbits = 0; in mbedtls_mpi_exp_mod() 1871 nbits++; in mbedtls_mpi_exp_mod() 1872 exponent_bits_in_window |= (ei << (window_bitsize - nbits)); in mbedtls_mpi_exp_mod() 1874 if (nbits == window_bitsize) { in mbedtls_mpi_exp_mod() 1892 nbits = 0; in mbedtls_mpi_exp_mod() 1900 for (i = 0; i < nbits; i++) { in mbedtls_mpi_exp_mod() 2398 int mbedtls_mpi_gen_prime(mbedtls_mpi *X, size_t nbits, int flags, in mbedtls_mpi_gen_prime() argument 2418 if (nbits < 3 || nbits > MBEDTLS_MPI_MAX_BITS) { in mbedtls_mpi_gen_prime() 2424 n = BITS_TO_LIMBS(nbits); in mbedtls_mpi_gen_prime() [all …]
|
D | psa_crypto_ecp.c | 183 *bits = ecp->grp.nbits + 1; in mbedtls_psa_ecp_import_key() 185 *bits = ecp->grp.nbits; in mbedtls_psa_ecp_import_key() 237 if (data_size < PSA_BITS_TO_BYTES(ecp->grp.nbits)) { in mbedtls_psa_ecp_export_key() 244 PSA_BITS_TO_BYTES(ecp->grp.nbits))); in mbedtls_psa_ecp_export_key() 246 *data_length = PSA_BITS_TO_BYTES(ecp->grp.nbits); in mbedtls_psa_ecp_export_key()
|
D | ecdsa.c | 219 size_t n_size = (grp->nbits + 7) / 8; in derive_mpi() 223 if (use_size * 8 > grp->nbits) { in derive_mpi() 224 MBEDTLS_MPI_CHK(mbedtls_mpi_shift_r(x, use_size * 8 - grp->nbits)); in derive_mpi() 421 size_t grp_len = (grp->nbits + 7) / 8; in mbedtls_ecdsa_sign_det_restartable()
|
D | rsa.c | 541 unsigned int nbits, int exponent) in mbedtls_rsa_gen_key() argument 552 if (nbits > 1024) { in mbedtls_rsa_gen_key() 560 if (nbits < 128 || exponent < 3 || nbits % 2 != 0) { in mbedtls_rsa_gen_key() 574 MBEDTLS_MPI_CHK(mbedtls_mpi_gen_prime(&ctx->P, nbits >> 1, in mbedtls_rsa_gen_key() 577 MBEDTLS_MPI_CHK(mbedtls_mpi_gen_prime(&ctx->Q, nbits >> 1, in mbedtls_rsa_gen_key() 582 if (mbedtls_mpi_bitlen(&H) <= ((nbits >= 200) ? ((nbits >> 1) - 99) : 0)) { in mbedtls_rsa_gen_key() 607 … if (mbedtls_mpi_bitlen(&ctx->D) <= ((nbits + 1) / 2)) { // (FIPS 186-4 §B.3.1 criterion 3(a)) in mbedtls_rsa_gen_key()
|
D | ecp.c | 526 grp->nbits = 0; in mbedtls_ecp_group_init() 2252 w = grp->nbits >= 384 ? 5 : 4; in ecp_pick_window_size() 2277 if (w >= grp->nbits) { in ecp_pick_window_size() 2322 d = (grp->nbits + w - 1) / w; in ecp_mul_comb() 2588 i = grp->nbits + 1; /* one past the (zero-based) required msb for private keys */ in ecp_mul_mxz() 3014 if (mbedtls_mpi_size(&pt->X) > (grp->nbits + 7) / 8) { in ecp_check_pubkey_mx() 3064 mbedtls_mpi_bitlen(d) - 1 != grp->nbits) { /* mbedtls_mpi_bitlen is one-based! */ in mbedtls_ecp_check_privkey() 3069 if (grp->nbits == 254 && mbedtls_mpi_get_bit(d, 2) != 0) { in mbedtls_ecp_check_privkey() 3149 return mbedtls_ecp_gen_privkey_mx(grp->nbits, d, f_rng, p_rng); in mbedtls_ecp_gen_privkey() 3423 MBEDTLS_MPI_CHK(mbedtls_mpi_set_bit(m, grp->nbits, 1)); in self_test_adjust_exponent() [all …]
|
D | pkparse.c | 361 grp->nbits = mbedtls_mpi_bitlen(&grp->N); in pk_group_from_specified() 388 if (grp->pbits == ref.pbits && grp->nbits == ref.nbits && in pk_group_id_from_group()
|
D | pk.c | 886 d_len = PSA_BITS_TO_BYTES(ec->grp.nbits); in mbedtls_pk_wrap_as_opaque()
|
D | ecp_curves.c | 4555 grp->nbits = mbedtls_mpi_bitlen(&grp->N); in ecp_group_load() 4682 grp->nbits = 254; in ecp_use_curve25519() 4743 grp->nbits = 447; in ecp_use_curve448()
|
D | pk_wrap.c | 740 const size_t signature_part_size = (ctx->grp.nbits + 7) / 8; in ecdsa_verify_wrap()
|
D | psa_crypto.c | 3591 operation->ctx->grp.nbits); 3808 coordinate_bytes = PSA_BITS_TO_BYTES(operation->ctx->grp.nbits); 5602 size_t m = ecp_group.nbits;
|
/mbedtls-3.5.0/tests/suites/ |
D | test_suite_ecdh.function | 129 if (grp.nbits % 8 != 0) { 130 unsigned char shift = 8 - (grp.nbits % 8); 147 if (grp.nbits % 8 != 0) { 148 unsigned char shift = 8 - (grp.nbits % 8); 274 TEST_ASSERT(grp.nbits % 8 == 0);
|
D | test_suite_ecdsa.function | 111 if (grp.nbits % 8 != 0) { 112 unsigned char shift = 8 - (grp.nbits % 8);
|
D | test_suite_ecp.function | 47 if (grp1->nbits != grp2->nbits) {
|
/mbedtls-3.5.0/tests/include/alt-dummy/ |
D | ecp_alt.h | 30 const size_t nbits; member
|
/mbedtls-3.5.0/include/mbedtls/ |
D | rsa.h | 466 unsigned int nbits, int exponent);
|
D | bignum.h | 1052 int mbedtls_mpi_gen_prime(mbedtls_mpi *X, size_t nbits, int flags,
|
D | ecp.h | 242 size_t nbits; /*!< For Short Weierstrass: The number of bits in \p P. member
|
/mbedtls-3.5.0/docs/architecture/ |
D | alternative-implementations.md | 51 * ECP: `mbedtls_ecp_group` must have the fields `id`, `P`, `A`, `B`, `G`, `N`, `pbits` and `nbits`.
|
/mbedtls-3.5.0/ |
D | ChangeLog | 5416 * Updated rsa_gen_key() so that ctx->N is always nbits in size
|