Lines Matching defs:bits

301 static int psa_is_dh_key_size_valid(size_t bits)
303 switch (bits) {
610 size_t bits)
622 if (bits != 128 && bits != 192 && bits != 256) {
629 if (bits != 128 && bits != 192 && bits != 256) {
636 if (bits != 128 && bits != 192 && bits != 256) {
643 if (bits != 64 && bits != 128 && bits != 192) {
650 if (bits != 256) {
658 if (bits % 8 != 0) {
739 size_t *key_buffer_length, size_t *bits)
750 *bits = PSA_BYTES_TO_BITS(data_length);
753 *bits);
775 bits);
786 bits);
798 bits);
2030 if (attributes->bits != 0) {
2031 if (attributes->bits != slot->attr.bits) {
2048 size_t bits;
2060 /* Ensure that the bytes-to-bits conversion cannot overflow. */
2091 bits = slot->attr.bits;
2096 &slot->key.bytes, &bits);
2101 if (slot->attr.bits == 0) {
2102 slot->attr.bits = (psa_key_bits_t) bits;
2103 } else if (bits != slot->attr.bits) {
2110 if (bits > PSA_MAX_KEY_BITS) {
2194 /* The target key type and number of bits have been validated by
2199 actual_attributes.bits = source_slot->attr.bits;
2558 * so we make this our minimum, even though 32 bits is still
3835 attributes->bits,
4053 attributes->bits,
5130 * bits. Without the guard this code will generate warnings on 32bit
6122 * (8 * ceiling(m/8) - m) bits of the first byte in the string to zero.
6143 size_t bits,
6162 mbedtls_ecc_group_from_psa(curve, bits);
6200 * (8 * ceiling(m/8) - m) bits of the first byte in
6236 * is determined by the curve, and sets the mandatory bits accordingly. That is:
6238 * - Curve25519 (PSA_ECC_FAMILY_MONTGOMERY, 255 bits):
6242 * - Curve448 (PSA_ECC_FAMILY_MONTGOMERY, 448 bits):
6250 size_t bits,
6258 switch (bits) {
6282 switch (bits) {
6301 psa_key_slot_t *slot, size_t bits,
6305 (void) bits;
6312 size_t bits, psa_key_derivation_operation_t *operation, uint8_t **data)
6314 (void) bits;
6324 size_t bits,
6328 size_t bytes = PSA_BITS_TO_BYTES(bits);
6342 status = psa_generate_derived_ecc_key_weierstrass_helper(slot, bits, operation, &data);
6348 status = psa_generate_derived_ecc_key_montgomery_helper(bits, operation, &data);
6357 if (bits % 8 != 0) {
6378 slot->attr.bits = (psa_key_bits_t) bits;
6396 &slot->key.bytes, &bits);
6397 if (bits != slot->attr.bits) {
6463 attributes->bits,
7644 PSA_RAW_KEY_AGREEMENT_OUTPUT_SIZE(slot->attr.type, slot->attr.bits);
7796 * \param bits The number of bits of the key
7801 * The size in bits of the key is not valid.
7803 * The type and/or the size in bits of the key or the combination of
7807 psa_key_type_t type, size_t bits)
7812 status = psa_validate_unstructured_key_bit_size(type, bits);
7819 if (bits > PSA_VENDOR_RSA_MAX_KEY_BITS) {
7822 if (bits < PSA_VENDOR_RSA_GENERATE_MIN_KEY_BITS) {
7828 if (bits % 8 != 0) {
7843 if (psa_is_dh_key_size_valid(bits) == 0) {
7963 attributes->type, attributes->bits);
7970 attributes->bits);
8415 cipher_suite->family, cipher_suite->bits);