/mbedtls-development/include/psa/ |
A D | crypto_values.h | 347 #define PSA_KEY_TYPE_IS_VENDOR_DEFINED(type) \ argument 348 (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0) 354 #define PSA_KEY_TYPE_IS_UNSTRUCTURED(type) \ argument 380 #define PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY(type) \ argument 381 ((type) | PSA_KEY_TYPE_CATEGORY_FLAG_PAIR) 392 #define PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) \ argument 393 ((type) & ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR) 677 #define PSA_KEY_TYPE_DH_GET_FAMILY(type) \ argument 678 ((psa_dh_family_t) (PSA_KEY_TYPE_IS_DH(type) ? \ 690 #define PSA_GET_KEY_TYPE_BLOCK_SIZE_EXPONENT(type) \ argument [all …]
|
A D | crypto_struct.h | 324 psa_key_type_t MBEDTLS_PRIVATE(type); 446 psa_key_type_t type, 451 psa_key_type_t type ) in psa_set_key_type() argument 456 attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(type) = type; in psa_set_key_type() 464 (void) psa_set_key_domain_parameters( attributes, type, NULL, 0 ); in psa_set_key_type() 471 return( attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(type) ); in psa_get_key_type()
|
A D | crypto_extra.h | 365 #define PSA_KEY_TYPE_IS_DSA(type) \ argument 366 (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) 502 psa_key_type_t type, 1748 psa_pake_primitive_type_t type; member 1773 return(PSA_PAKE_PRIMITIVE(cipher_suite->type, cipher_suite->family, in psa_pake_cs_get_primitive() 1781 cipher_suite->type = (psa_pake_primitive_type_t) (primitive >> 24); in psa_pake_cs_set_primitive()
|
/mbedtls-development/tests/suites/ |
A D | test_suite_psa_crypto_metadata.function | 170 TEST_EQUAL( PSA_KEY_TYPE_IS_ASYMMETRIC( type ), 174 ( PSA_KEY_TYPE_IS_ECC( type ) && 177 ( PSA_KEY_TYPE_IS_ECC( type ) && 180 ( PSA_KEY_TYPE_IS_DH( type ) && 183 ( PSA_KEY_TYPE_IS_DH( type ) && 186 TEST_PARITY( type ); 628 psa_key_type_t type = type_arg; 641 TEST_EQUAL( PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR( type ), type ); 651 TEST_EQUAL( PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY( type ), type ); 659 psa_key_type_t type = type_arg; [all …]
|
A D | test_suite_psa_crypto_metadata.data | 316 Key type: raw data 319 Key type: HMAC 323 Key type: secret for key derivation 326 Block cipher key type: AES 330 Block cipher key type: ARIA 334 Block cipher key type: DES 338 Block cipher key type: Camellia 342 Stream cipher key type: ChaCha20 346 Key type: RSA public key 350 Key type: RSA key pair
|
A D | test_suite_psa_crypto_persistent_key.function | 28 uint8_t type[4]; 203 psa_key_type_t type = (psa_key_type_t) type_arg; 209 psa_set_key_type( &attributes, type ); 235 TEST_EQUAL( psa_get_key_type( &attributes ), type ); 259 psa_key_type_t type = (psa_key_type_t) type_arg; 271 psa_set_key_type( &attributes, type ); 293 TEST_EQUAL( psa_get_key_type( &attributes ), type );
|
A D | test_suite_psa_crypto_attributes.function | 20 psa_key_type_t type = type_arg; 37 psa_set_key_type( &attributes, type ); 45 TEST_EQUAL( psa_get_key_type( &attributes ), type );
|
/mbedtls-development/tests/src/ |
A D | psa_exercise_key.c | 48 psa_key_type_t type; in check_key_attributes_sanity() local 54 type = psa_get_key_type( &attributes ); in check_key_attributes_sanity() 91 TEST_ASSERT( type != 0 ); in check_key_attributes_sanity() 94 if( PSA_KEY_TYPE_IS_UNSTRUCTURED( type ) ) in check_key_attributes_sanity() 98 if( PSA_KEY_TYPE_IS_ECC( type ) ) in check_key_attributes_sanity() 100 else if( PSA_KEY_TYPE_IS_RSA( type ) ) in check_key_attributes_sanity() 636 psa_key_type_t type, size_t bits, in mbedtls_test_psa_exported_key_sanity_check() argument 641 if( PSA_KEY_TYPE_IS_UNSTRUCTURED( type ) ) in mbedtls_test_psa_exported_key_sanity_check() 646 if( type == PSA_KEY_TYPE_RSA_KEY_PAIR ) in mbedtls_test_psa_exported_key_sanity_check() 706 if( type == PSA_KEY_TYPE_RSA_PUBLIC_KEY ) in mbedtls_test_psa_exported_key_sanity_check() [all …]
|
/mbedtls-development/library/ |
A D | psa_crypto_storage.h | 289 psa_crypto_transaction_type_t type; member 299 psa_crypto_transaction_type_t type; member 318 psa_crypto_transaction_type_t type ) in psa_crypto_prepare_transaction() argument 320 psa_crypto_transaction.unknown.type = type; in psa_crypto_prepare_transaction()
|
A D | psa_crypto_ecp.c | 75 psa_key_type_t type, size_t curve_bits, in mbedtls_psa_ecp_load_representation() argument 85 if( PSA_KEY_TYPE_IS_PUBLIC_KEY( type ) && in mbedtls_psa_ecp_load_representation() 86 PSA_KEY_TYPE_ECC_GET_FAMILY( type ) != PSA_ECC_FAMILY_MONTGOMERY ) in mbedtls_psa_ecp_load_representation() 146 if( PSA_KEY_TYPE_IS_PUBLIC_KEY( type ) ) in mbedtls_psa_ecp_load_representation() 203 status = mbedtls_psa_ecp_load_representation( attributes->core.type, in ecp_import_key() 211 if( PSA_KEY_TYPE_ECC_GET_FAMILY( attributes->core.type ) == in ecp_import_key() 220 status = mbedtls_psa_ecp_export_key( attributes->core.type, in ecp_import_key() 233 psa_status_t mbedtls_psa_ecp_export_key( psa_key_type_t type, in mbedtls_psa_ecp_export_key() argument 241 if( PSA_KEY_TYPE_IS_PUBLIC_KEY( type ) ) in mbedtls_psa_ecp_export_key() 293 attributes->core.type, attributes->core.bits, in ecp_export_public_key() [all …]
|
A D | pk_wrap.c | 67 return( type == MBEDTLS_PK_RSA || in rsa_can_do() 68 type == MBEDTLS_PK_RSASSA_PSS ); in rsa_can_do() 192 items->type = MBEDTLS_PK_DEBUG_MPI; in rsa_debug() 198 items->type = MBEDTLS_PK_DEBUG_MPI; in rsa_debug() 234 return( type == MBEDTLS_PK_ECKEY || in eckey_can_do() 236 type == MBEDTLS_PK_ECDSA ); in eckey_can_do() 425 items->type = MBEDTLS_PK_DEBUG_ECP; in eckey_debug() 463 return( type == MBEDTLS_PK_ECKEY || in eckeydh_can_do() 494 return( type == MBEDTLS_PK_ECDSA ); in ecdsa_can_do() 766 return( type == MBEDTLS_PK_RSA ); in rsa_alt_can_do() [all …]
|
A D | psa_crypto_client.c | 40 psa_key_type_t type, in psa_set_key_domain_parameters() argument 65 attributes->core.type = type; in psa_set_key_domain_parameters()
|
A D | psa_crypto.c | 439 switch( type ) in psa_validate_unstructured_key_bit_size() 559 psa_key_type_t type = attributes->core.type; in psa_import_key_into_slot() local 1280 psa_key_type_t type = attributes->core.type; in psa_export_key_internal() local 1349 psa_key_type_t type = attributes->core.type; in psa_export_public_key_internal() local 1351 if( PSA_KEY_TYPE_IS_RSA( type ) || PSA_KEY_TYPE_IS_ECC( type ) ) in psa_export_public_key_internal() 1825 if( attributes->core.type != slot->attr.type ) in psa_validate_optional_attributes() 2032 actual_attributes.core.type = source_slot->attr.type; in psa_copy_key() 5622 if( PSA_KEY_TYPE_IS_RSA( type ) && PSA_KEY_TYPE_IS_KEY_PAIR( type ) ) in psa_validate_key_type_and_size_for_key_generation() 5636 if( PSA_KEY_TYPE_IS_ECC( type ) && PSA_KEY_TYPE_IS_KEY_PAIR( type ) ) in psa_validate_key_type_and_size_for_key_generation() 5655 psa_key_type_t type = attributes->core.type; in psa_generate_key_internal() local [all …]
|
A D | md.c | 242 switch( ctx->md_info->type ) in mbedtls_md_free() 306 switch( src->md_info->type ) in mbedtls_md_clone() 350 #define ALLOC( type ) \ argument 355 mbedtls_##type##_init( ctx->md_ctx ); \ 368 switch( md_info->type ) in mbedtls_md_setup() 428 switch( ctx->md_info->type ) in mbedtls_md_starts() 468 switch( ctx->md_info->type ) in mbedtls_md_update() 508 switch( ctx->md_info->type ) in mbedtls_md_finish() 549 switch( md_info->type ) in mbedtls_md() 753 switch( ctx->md_info->type ) in mbedtls_md_process() [all …]
|
A D | pk.c | 159 psa_key_type_t type; in mbedtls_pk_setup_opaque() local 166 type = psa_get_key_type( &attributes ); in mbedtls_pk_setup_opaque() 170 if( ! PSA_KEY_TYPE_IS_ECC_KEY_PAIR( type ) ) in mbedtls_pk_setup_opaque() 220 int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type ) in mbedtls_pk_can_do() argument 228 return( ctx->pk_info->can_do( type ) ); in mbedtls_pk_can_do() 334 int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options, in mbedtls_pk_verify_ext() argument 347 if( ! mbedtls_pk_can_do( ctx, type ) ) in mbedtls_pk_verify_ext() 350 if( type == MBEDTLS_PK_RSASSA_PSS ) in mbedtls_pk_verify_ext() 528 if( prv->pk_info->type == MBEDTLS_PK_RSA_ALT ) in mbedtls_pk_check_pair() 530 if( pub->pk_info->type != MBEDTLS_PK_RSA ) in mbedtls_pk_check_pair() [all …]
|
A D | mps_trace.h | 130 #define MBEDTLS_MPS_TRACE( type, ... ) \ argument 134 mbedtls_mps_trace_indent( mbedtls_mps_trace_get_depth(), type ); \ 167 #define MBEDTLS_MPS_TRACE( type, ... ) do { } while( 0 ) argument
|
A D | psa_crypto_rsa.c | 100 psa_key_type_t type, const uint8_t *data, size_t data_length, in mbedtls_psa_rsa_load_representation() argument 109 if( PSA_KEY_TYPE_IS_KEY_PAIR( type ) ) in mbedtls_psa_rsa_load_representation() 169 status = mbedtls_psa_rsa_load_representation( attributes->core.type, in rsa_import_key() 182 status = mbedtls_psa_rsa_export_key( attributes->core.type, in rsa_import_key() 195 psa_status_t mbedtls_psa_rsa_export_key( psa_key_type_t type, in mbedtls_psa_rsa_export_key() argument 213 if( PSA_KEY_TYPE_IS_KEY_PAIR( type ) ) in mbedtls_psa_rsa_export_key() 242 (void) type; in mbedtls_psa_rsa_export_key() 260 attributes->core.type, key_buffer, key_buffer_size, &rsa ); in rsa_export_public_key() 330 status = mbedtls_psa_rsa_export_key( attributes->core.type, in rsa_generate_key() 387 status = mbedtls_psa_rsa_load_representation( attributes->core.type, in rsa_sign_hash() [all …]
|
A D | net_sockets.c | 344 int type; in mbedtls_net_accept() local 352 socklen_t type_len = (socklen_t) sizeof( type ); in mbedtls_net_accept() 355 int type_len = (int) sizeof( type ); in mbedtls_net_accept() 360 (void *) &type, &type_len ) != 0 || in mbedtls_net_accept() 361 ( type != SOCK_STREAM && type != SOCK_DGRAM ) ) in mbedtls_net_accept() 366 if( type == SOCK_STREAM ) in mbedtls_net_accept() 400 if( type != SOCK_STREAM ) in mbedtls_net_accept()
|
A D | cipher.c | 103 int *type; in mbedtls_cipher_list() local 108 type = mbedtls_cipher_supported; in mbedtls_cipher_list() 110 while( def->type != 0 ) in mbedtls_cipher_list() 111 *type++ = (*def++).type; in mbedtls_cipher_list() 113 *type = 0; in mbedtls_cipher_list() 127 if( def->type == cipher_type ) in mbedtls_cipher_info_from_type() 257 if( mbedtls_psa_translate_cipher_type( cipher_info->type ) == 0 ) in mbedtls_cipher_setup_psa() 306 ctx->cipher_info->type ); in mbedtls_cipher_setkey() 407 if ( ctx->cipher_info->type == MBEDTLS_CIPHER_CHACHA20 ) in mbedtls_cipher_set_iv() 509 if (MBEDTLS_CIPHER_CHACHA20_POLY1305 == ctx->cipher_info->type ) in mbedtls_cipher_update_ad() [all …]
|
A D | psa_crypto_storage.c | 243 uint8_t type[2]; member 261 MBEDTLS_PUT_UINT16_LE( (uint16_t) attr->type, storage_format->type, 0 ); in psa_format_key_data_for_storage() 318 attr->type = MBEDTLS_GET_UINT16_LE( storage_format->type, 0 ); in psa_parse_key_data_from_storage()
|
/mbedtls-development/programs/test/ |
A D | udp_proxy.c | 504 const char *type; member 522 p->way, p->type, p->len ); in print_packet() 525 p->way, p->type, p->len, why ); in print_packet() 560 strcmp( p->type, "ClientHello" ) == 0 ) in send_packet() 568 strcmp( p->type, "CID" ) == 0 && in send_packet() 587 strcmp( p->type, "ApplicationData" ) == 0 ) in send_packet() 618 strcmp( p->type, "ApplicationData" ) != 0 && in send_packet() 633 strcmp( p->type, "ApplicationData" ) == 0 ) in send_packet() 720 cur.type = msg_type( cur.buf, cur.len ); in handle_message() 762 strcmp( cur.type, "CID" ) != 0 && in handle_message() [all …]
|
/mbedtls-development/tests/src/drivers/ |
A D | test_driver_key_management.c | 225 psa_key_type_t type = psa_get_key_type( attributes ); in mbedtls_test_transparent_import_key() local 229 if( PSA_KEY_TYPE_IS_ECC( type ) ) in mbedtls_test_transparent_import_key() 241 if( PSA_KEY_TYPE_IS_RSA( type ) ) in mbedtls_test_transparent_import_key() 259 (void)type; in mbedtls_test_transparent_import_key() 276 psa_key_type_t type = psa_get_key_type( attributes ); in mbedtls_test_opaque_import_key() local 285 if( PSA_KEY_TYPE_IS_UNSTRUCTURED( type ) ) in mbedtls_test_opaque_import_key() 303 else if( PSA_KEY_TYPE_IS_ECC( type ) ) in mbedtls_test_opaque_import_key() 318 if( PSA_KEY_TYPE_IS_RSA( type ) ) in mbedtls_test_opaque_import_key() 409 if( PSA_KEY_TYPE_IS_UNSTRUCTURED( type ) || in mbedtls_test_opaque_export_key() 410 PSA_KEY_TYPE_IS_RSA( type ) || in mbedtls_test_opaque_export_key() [all …]
|
/mbedtls-development/scripts/mbedtls_dev/ |
A D | psa_storage.py | 108 type: Exprable, #pylint: disable=redefined-builtin 116 self.type = as_expr(type) #type: Expr 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/scripts/ |
A D | abi_check.py | 357 "-r", "--report-dir", type=str, default="reports", 365 "-o", "--old-rev", type=str, help="revision for old version.", 369 "-or", "--old-repo", type=str, help="repository for old version." 372 "-oc", "--old-crypto-rev", type=str, 376 "-ocr", "--old-crypto-repo", type=str, 380 "-n", "--new-rev", type=str, help="revision for new version", 384 "-nr", "--new-repo", type=str, help="repository for new version." 387 "-nc", "--new-crypto-rev", type=str, 391 "-ncr", "--new-crypto-repo", type=str, 395 "-s", "--skip-file", type=str,
|
/mbedtls-development/programs/pkey/ |
A D | gen_key.c | 140 int type; /* the type of key to generate */ member 229 opt.type = DFL_TYPE; in main() 246 opt.type = MBEDTLS_PK_RSA; in main() 248 opt.type = MBEDTLS_PK_ECKEY; in main() 323 mbedtls_pk_info_from_type( (mbedtls_pk_type_t) opt.type ) ) ) != 0 ) in main() 330 if( opt.type == MBEDTLS_PK_RSA ) in main() 343 if( opt.type == MBEDTLS_PK_ECKEY ) in main()
|