Home
last modified time | relevance | path

Searched refs:bits (Results 1 – 25 of 64) sorted by relevance

123

/mbedtls-development/include/psa/
A Dcrypto_extra.h598 *bits = 192; in mbedtls_ecc_group_to_psa()
601 *bits = 224; in mbedtls_ecc_group_to_psa()
604 *bits = 256; in mbedtls_ecc_group_to_psa()
607 *bits = 384; in mbedtls_ecc_group_to_psa()
610 *bits = 521; in mbedtls_ecc_group_to_psa()
613 *bits = 256; in mbedtls_ecc_group_to_psa()
616 *bits = 384; in mbedtls_ecc_group_to_psa()
619 *bits = 512; in mbedtls_ecc_group_to_psa()
622 *bits = 255; in mbedtls_ecc_group_to_psa()
637 *bits = 0; in mbedtls_ecc_group_to_psa()
[all …]
A Dcrypto_struct.h325 psa_key_bits_t MBEDTLS_PRIVATE(bits);
475 size_t bits ) in psa_set_key_bits() argument
477 if( bits > PSA_MAX_KEY_BITS ) in psa_set_key_bits()
478 attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(bits) = PSA_KEY_BITS_TOO_LARGE; in psa_set_key_bits()
480 attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(bits) = (psa_key_bits_t) bits; in psa_set_key_bits()
486 return( attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(bits) ); in psa_get_key_bits()
A Dcrypto_sizes.h47 #define PSA_BITS_TO_BYTES(bits) (((bits) + 7) / 8) argument
693 #define PSA_KEY_EXPORT_ASN1_INTEGER_MAX_SIZE(bits) \ argument
694 ((bits) / 8 + 5)
/mbedtls-development/tests/suites/
A Dtest_suite_asn1write.data112 ASN.1 Write mpi, 127*8-1 bits
115 #ASN.1 Write mpi, 127*8 bits
118 ASN.1 Write mpi, 127*8+1 bits
121 ASN.1 Write mpi, 255*8-1 bits
124 #ASN.1 Write mpi, 255*8 bits
127 ASN.1 Write mpi, 256*8-1 bits
304 ASN.1 Write Bitstring / Unused bits #0
307 ASN.1 Write Bitstring / Unused bits #1
310 ASN.1 Write Bitstring / Unused bits #2
331 ASN.1 Write Bitstring / 0 bits
[all …]
A Dtest_suite_pkwrite.data9 Public key write check EC 192 bits
13 Public key write check EC 521 bits
17 Public key write check EC Brainpool 512 bits
29 Private key write check EC 192 bits
33 Private key write check EC 256 bits (top bit set)
37 Private key write check EC 521 bits
41 Private key write check EC 521 bits (top byte is 0)
45 Private key write check EC Brainpool 512 bits
A Dtest_suite_debug.data41 mbedtls_debug_print_mpi:16:"":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (0 bits) is\:\n…
44 …"00000000000000":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (0 bits) is\:\nMyFile(0999)…
46 Debug print mbedtls_mpi #2: 3 bits
47 …"00000000000007":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (3 bits) is\:\nMyFile(0999)…
49 Debug print mbedtls_mpi: 49 bits
50 …01020304050607":"MyFile":999:"VALUE":"MyFile(0999)\: value of 'VALUE' (49 bits) is\:\nMyFile(0999)…
52 Debug print mbedtls_mpi: 759 bits
55 Debug print mbedtls_mpi: 764 bits #1
58 Debug print mbedtls_mpi: 764 bits #2
63bits\nMyFile(0999)\: basic constraints \: CA=false\nMyFile(0999)\: value of 'crt->rsa.N' (2048 bit…
[all …]
A Dtest_suite_psa_crypto_generate_key.function23 size_t bits = bits_arg;
28 psa_set_key_bits( &attributes, bits );
41 TEST_EQUAL( psa_get_key_bits( &attributes ), bits );
A Dtest_suite_rsa.data187 RSA PKCS1 Sign #1 (SHA512, 1536 bits RSA)
195 RSA PKCS1 Sign #2 (SHA256, 2048 bits RSA)
207 RSA PKCS1 Sign #3 (SHA224, 2048 bits RSA)
215 RSA PKCS1 Sign #4 (SHA384, 2048 bits RSA)
223 RSA PKCS1 Sign #7 (MD5, 2048 bits RSA)
231 RSA PKCS1 Sign #8 (RAW, 2048 bits RSA)
324 RSA Check Public key #4 (N exactly 128 bits)
337 RSA Check Public key #8 (E exactly 2 bits)
340 RSA Check Public key #8 (E exactly 1 bits)
343 RSA Check Public key #8 (E exactly 64 bits)
[all …]
A Dtest_suite_psa_crypto_not_supported.function36 void generate_not_supported( int key_type, int bits )
43 psa_set_key_bits( &attributes, bits );
A Dtest_suite_psa_crypto_se_driver_hal.function186 *bits = PSA_BYTES_TO_BITS( data_length );
234 size_t bits;
331 if( *bits == 0 )
340 ram_slots[slot_number].bits = *bits;
1153 size_t bits = bits_arg;
1178 psa_set_key_bits( &attributes, bits );
1193 psa_key_bits_t bits = bits_arg;
1227 psa_set_key_bits( &attributes, bits );
1269 size_t bits = bits_arg;
1270 /* Pass bits=0 to import, bits>0 to fake-generate */
[all …]
A Dtest_suite_psa_crypto_attributes.function21 size_t bits = bits_arg;
38 psa_set_key_bits( &attributes, bits );
46 TEST_EQUAL( psa_get_key_bits( &attributes ), bits );
/mbedtls-development/tests/src/
A Dpsa_exercise_key.c49 size_t bits; in check_key_attributes_sanity() local
55 bits = psa_get_key_bits( &attributes ); in check_key_attributes_sanity()
92 TEST_ASSERT( bits != 0 ); in check_key_attributes_sanity()
95 TEST_ASSERT( bits % 8 == 0 ); in check_key_attributes_sanity()
636 psa_key_type_t type, size_t bits, in mbedtls_test_psa_exported_key_sanity_check() argument
669 if( ! mbedtls_test_asn1_skip_integer( &p, end, bits, bits, 1 ) ) in mbedtls_test_psa_exported_key_sanity_check()
674 if( ! mbedtls_test_asn1_skip_integer( &p, end, bits / 2, bits, 1 ) ) in mbedtls_test_psa_exported_key_sanity_check()
677 if( ! mbedtls_test_asn1_skip_integer( &p, end, bits / 2, bits / 2 + 1, 1 ) ) in mbedtls_test_psa_exported_key_sanity_check()
679 if( ! mbedtls_test_asn1_skip_integer( &p, end, bits / 2, bits / 2 + 1, 1 ) ) in mbedtls_test_psa_exported_key_sanity_check()
720 if( ! mbedtls_test_asn1_skip_integer( &p, end, bits, bits, 1 ) ) in mbedtls_test_psa_exported_key_sanity_check()
[all …]
/mbedtls-development/tests/scripts/
A Dgenerate_psa_tests.py137 verb: str, key_type: str, bits: int,
194 for bits in kt.sizes_to_test():
212 str(bits),
236 key_type: str, bits: int,
288 for bits in kt.sizes_to_test():
290 kt.expression, bits,
292 str(bits),
508 for bits in kt.sizes_to_test():
519 type=kt.expression, bits=bits,
609 bits = key_type.sizes_to_test()[0]
[all …]
/mbedtls-development/scripts/mbedtls_dev/
A Dcrypto_knowledge.py113 def key_material(self, bits: int) -> bytes:
127 if bits not in ASYMMETRIC_KEY_DATA[self.expression]:
129 .format(bits, self.expression))
130 return ASYMMETRIC_KEY_DATA[self.expression][bits]
131 if bits % 8 != 0:
133 .format(bits, self.expression))
134 length = bits // 8
A Dpsa_storage.py109 bits: int,
117 self.bits = bits #type: int
153 self.lifetime, self.type, self.bits,
179 type=0x2400, bits=128,
190 type='PSA_KEY_TYPE_RAW_DATA', bits=length*8,
198 key = Key(type=0x1001, bits=8,
/mbedtls-development/library/
A Dasn1write.c304 size_t bits ) in mbedtls_asn1_write_named_bitstring() argument
311 byte_len = ( bits + 7 ) / 8; in mbedtls_asn1_write_named_bitstring()
312 unused_bits = ( byte_len * 8 ) - bits; in mbedtls_asn1_write_named_bitstring()
319 if( bits != 0 ) in mbedtls_asn1_write_named_bitstring()
332 bits--; in mbedtls_asn1_write_named_bitstring()
333 if( bits == 0 ) in mbedtls_asn1_write_named_bitstring()
336 if( bits % 8 == 0 ) in mbedtls_asn1_write_named_bitstring()
341 return( mbedtls_asn1_write_bitstring( p, start, buf, bits ) ); in mbedtls_asn1_write_named_bitstring()
345 const unsigned char *buf, size_t bits ) in mbedtls_asn1_write_bitstring() argument
351 byte_len = ( bits + 7 ) / 8; in mbedtls_asn1_write_bitstring()
[all …]
A Dpsa_crypto_ecp.c197 size_t *key_buffer_length, size_t *bits ) in ecp_import_key() argument
204 attributes->core.bits, in ecp_import_key()
213 *bits = ecp->grp.nbits + 1; in ecp_import_key()
215 *bits = ecp->grp.nbits; in ecp_import_key()
293 attributes->core.type, attributes->core.bits, in ecp_export_public_key()
322 mbedtls_ecc_group_of_psa( curve, attributes->core.bits, 0 ); in ecp_generate_key()
375 attributes->core.bits, in ecdsa_sign_hash()
505 size_t *key_buffer_length, size_t *bits ) in mbedtls_psa_ecp_import_key() argument
509 key_buffer_length, bits ) ); in mbedtls_psa_ecp_import_key()
579 size_t *key_buffer_length, size_t *bits ) in mbedtls_test_driver_ecp_import_key() argument
[all …]
A Dpsa_crypto_rsa.c105 size_t bits; in mbedtls_psa_rsa_load_representation() local
130 bits = PSA_BYTES_TO_BITS( mbedtls_rsa_get_len( mbedtls_pk_rsa( ctx ) ) ); in mbedtls_psa_rsa_load_representation()
131 if( bits > PSA_VENDOR_RSA_MAX_KEY_BITS ) in mbedtls_psa_rsa_load_representation()
163 size_t *key_buffer_length, size_t *bits ) in rsa_import_key() argument
176 *bits = (psa_key_bits_t) PSA_BYTES_TO_BITS( mbedtls_rsa_get_len( rsa ) ); in rsa_import_key()
325 (unsigned int)attributes->core.bits, in rsa_generate_key()
568 size_t *key_buffer_length, size_t *bits ) in mbedtls_psa_rsa_import_key() argument
572 key_buffer_length, bits ) ); in mbedtls_psa_rsa_import_key()
642 size_t *key_buffer_length, size_t *bits ) in mbedtls_test_driver_rsa_import_key() argument
646 key_buffer_length, bits ) ); in mbedtls_test_driver_rsa_import_key()
A Dpsa_crypto.c447 if( bits != 128 && bits != 192 && bits != 256 ) in psa_validate_unstructured_key_bit_size()
453 if( bits != 128 && bits != 192 && bits != 256 ) in psa_validate_unstructured_key_bit_size()
459 if( bits != 128 && bits != 192 && bits != 256 ) in psa_validate_unstructured_key_bit_size()
465 if( bits != 64 && bits != 128 && bits != 192 ) in psa_validate_unstructured_key_bit_size()
1878 if( attributes->core.bits != slot->attr.bits ) in psa_validate_optional_attributes()
1931 bits = slot->attr.bits; in psa_import_key()
1941 slot->attr.bits = (psa_key_bits_t) bits; in psa_import_key()
1942 else if( bits != slot->attr.bits ) in psa_import_key()
2031 actual_attributes.core.bits = source_slot->attr.bits; in psa_copy_key()
4722 slot->attr.bits = (psa_key_bits_t) bits; in psa_generate_derived_key_internal()
[all …]
A Dpsa_crypto_storage.c244 uint8_t bits[2]; member
262 MBEDTLS_PUT_UINT16_LE( (uint16_t) attr->bits, storage_format->bits, 0 ); in psa_format_key_data_for_storage()
319 attr->bits = MBEDTLS_GET_UINT16_LE( storage_format->bits, 0 ); in psa_parse_key_data_from_storage()
/mbedtls-development/include/mbedtls/
A Dpsa_util.h169 psa_ecc_family_t curve, size_t bits, in mbedtls_psa_get_ecc_oid_from_id() argument
175 switch( bits ) in mbedtls_psa_get_ecc_oid_from_id()
210 switch( bits ) in mbedtls_psa_get_ecc_oid_from_id()
233 switch( bits ) in mbedtls_psa_get_ecc_oid_from_id()
376 uint16_t tls_ecc_grp_reg_id, size_t *bits ) in mbedtls_psa_parse_tls_ecc_group() argument
383 mbedtls_ecc_group_to_psa( curve_info->grp_id, bits ) ) ); in mbedtls_psa_parse_tls_ecc_group()
A Decdsa.h56 #define MBEDTLS_ECDSA_MAX_SIG_LEN( bits ) \ argument
57 ( /*T,L of SEQUENCE*/ ( ( bits ) >= 61 * 8 ? 3 : 2 ) + \
58 /*T,L of r,s*/ 2 * ( ( ( bits ) >= 127 * 8 ? 3 : 2 ) + \
59 /*V of r,s*/ ( ( bits ) + 8 ) / 8 ) )
A Dasn1write.h295 const unsigned char *buf, size_t bits );
317 size_t bits );
/mbedtls-development/tests/src/drivers/
A Dtest_driver_key_management.c217 size_t *bits) in mbedtls_test_transparent_import_key() argument
235 key_buffer_length, bits ); in mbedtls_test_transparent_import_key()
247 key_buffer_length, bits ); in mbedtls_test_transparent_import_key()
258 (void)bits; in mbedtls_test_transparent_import_key()
273 size_t *bits) in mbedtls_test_opaque_import_key() argument
287 *bits = PSA_BYTES_TO_BITS( data_length ); in mbedtls_test_opaque_import_key()
290 *bits ); in mbedtls_test_opaque_import_key()
310 key_buffer_length, bits ); in mbedtls_test_opaque_import_key()
325 key_buffer_length, bits ); in mbedtls_test_opaque_import_key()
/mbedtls-development/tests/include/test/drivers/
A Dkey_management.h99 size_t *bits);
108 size_t *bits);

Completed in 99 milliseconds

123