/mbedtls-development/library/ |
A D | psa_crypto_slot_management.c | 283 psa_key_lifetime_t lifetime = PSA_KEY_LIFETIME_VOLATILE; in psa_load_builtin_key_into_slot() local 296 slot->attr.id, &lifetime, &slot_number ); in psa_load_builtin_key_into_slot() 303 psa_set_key_lifetime( &attributes, lifetime ); in psa_load_builtin_key_into_slot() 375 (*p_slot)->attr.lifetime = PSA_KEY_LIFETIME_PERSISTENT; in psa_get_and_lock_key_slot() 427 psa_status_t psa_validate_key_location( psa_key_lifetime_t lifetime, in psa_validate_key_location() argument 430 if ( psa_key_lifetime_is_external( lifetime ) ) in psa_validate_key_location() 461 if ( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) in psa_validate_key_persistence() 470 if( PSA_KEY_LIFETIME_IS_READ_ONLY( lifetime ) ) in psa_validate_key_persistence() 539 if( ( ! PSA_KEY_LIFETIME_IS_VOLATILE( slot->attr.lifetime ) ) && in psa_purge_key() 564 if( PSA_KEY_LIFETIME_IS_VOLATILE( slot->attr.lifetime ) ) in mbedtls_psa_get_stats() [all …]
|
A D | psa_crypto_slot_management.h | 180 static inline int psa_key_lifetime_is_external( psa_key_lifetime_t lifetime ) in psa_key_lifetime_is_external() argument 182 return( PSA_KEY_LIFETIME_GET_LOCATION( lifetime ) in psa_key_lifetime_is_external() 200 psa_status_t psa_validate_key_location( psa_key_lifetime_t lifetime, 211 psa_status_t psa_validate_key_persistence( psa_key_lifetime_t lifetime );
|
A D | psa_crypto_driver_wrappers.c | 84 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_sign_message() 158 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_verify_message() 245 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_sign_hash() 329 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_verify_hash() 402 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_get_key_buffer_size_from_key_data() 481 PSA_KEY_LIFETIME_GET_LOCATION(attributes->core.lifetime); in psa_driver_wrapper_generate_key() 794 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_copy_key() 846 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_cipher_encrypt() 928 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_cipher_decrypt() 1005 PSA_KEY_LIFETIME_GET_LOCATION( attributes->core.lifetime ); in psa_driver_wrapper_cipher_encrypt_setup() [all …]
|
A D | psa_crypto_se.h | 92 int psa_get_se_driver( psa_key_lifetime_t lifetime, 104 psa_key_lifetime_t lifetime );
|
A D | psa_crypto_storage.c | 242 uint8_t lifetime[sizeof( psa_key_lifetime_t )]; member 260 MBEDTLS_PUT_UINT32_LE( attr->lifetime, storage_format->lifetime, 0 ); in psa_format_key_data_for_storage() 317 attr->lifetime = MBEDTLS_GET_UINT32_LE( storage_format->lifetime, 0 ); in psa_parse_key_data_from_storage()
|
A D | psa_crypto_se.c | 76 psa_key_lifetime_t lifetime ) in psa_get_se_driver_entry() argument 79 psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION( lifetime ); in psa_get_se_driver_entry() 106 int psa_get_se_driver( psa_key_lifetime_t lifetime, in psa_get_se_driver() argument 110 psa_se_drv_table_entry_t *driver = psa_get_se_driver_entry( lifetime ); in psa_get_se_driver()
|
A D | psa_crypto.c | 1053 if( PSA_KEY_LIFETIME_IS_READ_ONLY( slot->attr.lifetime ) ) in psa_destroy_key() 1065 driver = psa_get_se_driver_entry( slot->attr.lifetime ); in psa_destroy_key() 1074 psa_crypto_transaction.key.lifetime = slot->attr.lifetime; in psa_destroy_key() 1100 if( ! PSA_KEY_LIFETIME_IS_VOLATILE( slot->attr.lifetime ) ) in psa_destroy_key() 1197 if( psa_get_se_driver_entry( slot->attr.lifetime ) != NULL ) in psa_get_key_attributes() 1501 status = psa_validate_key_location( lifetime, p_drv ); in psa_validate_key_attributes() 1505 status = psa_validate_key_persistence( lifetime ); in psa_validate_key_attributes() 1509 if ( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) in psa_validate_key_attributes() 1599 if( PSA_KEY_LIFETIME_IS_VOLATILE( slot->attr.lifetime ) ) in psa_start_key_creation() 1644 psa_crypto_transaction.key.lifetime = slot->attr.lifetime; in psa_start_key_creation() [all …]
|
A D | psa_crypto_storage.h | 301 psa_key_lifetime_t lifetime; member
|
A D | ssl_ticket.c | 130 uint32_t lifetime ) in mbedtls_ssl_ticket_setup() argument 138 ctx->ticket_lifetime = lifetime; in mbedtls_ssl_ticket_setup()
|
/mbedtls-development/include/psa/ |
A D | crypto_struct.h | 326 psa_key_lifetime_t MBEDTLS_PRIVATE(lifetime); 362 psa_key_lifetime_t lifetime = attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(lifetime); in psa_set_key_id() local 366 if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) in psa_set_key_id() 368 attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(lifetime) = in psa_set_key_id() 371 PSA_KEY_LIFETIME_GET_LOCATION( lifetime ) ); in psa_set_key_id() 390 psa_key_lifetime_t lifetime ) in psa_set_key_lifetime() argument 392 attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(lifetime) = lifetime; in psa_set_key_lifetime() 393 if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) in psa_set_key_lifetime() 406 return( attributes->MBEDTLS_PRIVATE(core).MBEDTLS_PRIVATE(lifetime) ); in psa_get_key_lifetime()
|
A D | crypto_values.h | 2112 #define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) \ argument 2113 ((psa_key_persistence_t)((lifetime) & 0x000000ff)) 2115 #define PSA_KEY_LIFETIME_GET_LOCATION(lifetime) \ argument 2116 ((psa_key_location_t)((lifetime) >> 8)) 2134 #define PSA_KEY_LIFETIME_IS_VOLATILE(lifetime) \ argument 2135 (PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \ 2155 #define PSA_KEY_LIFETIME_IS_READ_ONLY(lifetime) \ argument 2156 (PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \
|
/mbedtls-development/tests/src/drivers/ |
A D | platform_builtin_keys.c | 35 psa_key_lifetime_t lifetime; member 74 psa_key_lifetime_t *lifetime, in mbedtls_psa_platform_get_builtin_key() argument 86 *lifetime = builtin_key->lifetime; in mbedtls_psa_platform_get_builtin_key()
|
/mbedtls-development/tests/suites/ |
A D | test_suite_psa_crypto_se_driver_hal_mocks.function | 7 /** The location and lifetime used for tests that use a single driver. */ 332 psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME; 354 psa_set_key_lifetime( &attributes, lifetime ); 378 TEST_ASSERT( mock_import_data.attributes.core.lifetime == 401 psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME; 425 psa_set_key_lifetime( &attributes, lifetime ); 455 psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME; 475 psa_set_key_lifetime( &attributes, lifetime ); 545 psa_set_key_lifetime( &attributes, lifetime ); 602 psa_set_key_lifetime( &attributes, lifetime ); [all …]
|
A D | test_suite_psa_crypto_attributes.data | 8 PSA key attributes: lifetime=3 only 17 PSA key attributes: id then lifetime 20 PSA key attributes: lifetime then id 23 PSA key attributes: non local volatile lifetime then id
|
A D | test_suite_psa_crypto_attributes.function | 17 psa_key_lifetime_t lifetime = lifetime_arg; 34 psa_set_key_lifetime( &attributes, lifetime ); 42 TEST_EQUAL( psa_get_key_lifetime( &attributes ), lifetime ); 71 psa_key_lifetime_t lifetime = lifetime_arg; 81 psa_set_key_lifetime( &attributes, lifetime );
|
A D | test_suite_psa_crypto_metadata.data | 385 lifetime:PSA_KEY_LIFETIME_VOLATILE:KEY_LIFETIME_IS_VOLATILE:PSA_KEY_PERSISTENCE_VOLATILE:PSA_KEY_LO… 388 lifetime:PSA_KEY_LIFETIME_PERSISTENT:0:PSA_KEY_PERSISTENCE_DEFAULT:PSA_KEY_LOCATION_LOCAL_STORAGE 391 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_VOLATILE, PSA_KEY_LOCAT… 394 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_DEFAULT, PSA_KEY_LOCATI… 397 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(2, PSA_KEY_LOCATION_LOCAL_STORAGE):0:2:PSA_… 400 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(254, PSA_KEY_LOCATION_LOCAL_STORAGE):0:254:… 406 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_VOLATILE, 0x123456):KEY… 409 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_DEFAULT, 0x123456):0:PS… 412 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(2, 0x123456):0:2:0x123456 415 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(254, 0x123456):0:254:0x123456 [all …]
|
A D | test_suite_psa_crypto_se_driver_hal.function | 232 psa_key_lifetime_t lifetime; 555 psa_key_lifetime_t lifetime = 888 psa_set_key_lifetime( &attributes, lifetime ); 895 if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) 953 if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) 1021 psa_set_key_lifetime( &attributes, lifetime ); 1107 psa_set_key_lifetime( &attributes, lifetime ); 1176 psa_set_key_lifetime( &attributes, lifetime ); 1220 psa_set_key_lifetime( &attributes, lifetime ); 1442 psa_key_lifetime_t lifetime = lifetime_arg; [all …]
|
A D | test_suite_psa_crypto_storage_format.function | 160 psa_key_lifetime_t lifetime = lifetime_arg; 173 psa_set_key_lifetime( &attributes, lifetime ); 204 psa_key_lifetime_t lifetime = lifetime_arg; 217 psa_set_key_lifetime( &attributes, lifetime );
|
A D | test_suite_psa_crypto_slot_management.function | 201 psa_key_lifetime_t lifetime = lifetime_arg; 227 psa_set_key_lifetime( &attributes, lifetime ); 242 TEST_EQUAL( psa_get_key_lifetime( &attributes ), lifetime ); 262 TEST_EQUAL( psa_get_key_lifetime( &attributes ), lifetime ); 356 psa_key_lifetime_t lifetime = lifetime_arg; 374 psa_set_key_lifetime( &attributes, lifetime ); 446 psa_key_lifetime_t lifetime = lifetime_arg; 458 psa_set_key_lifetime( &attributes, lifetime ); 459 if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) 907 psa_set_key_lifetime( &attributes, lifetime ); [all …]
|
A D | test_suite_psa_crypto_metadata.function | 63 /* Flags for lifetime classification macros. There is a flag for every 64 * lifetime classification macro PSA_KEY_LIFETIME_IS_xxx. The name of the 722 void lifetime( int lifetime_arg, int classification_flags, 725 psa_key_lifetime_t lifetime = lifetime_arg; 731 TEST_CLASSIFICATION_MACRO( 1, KEY_LIFETIME_IS_VOLATILE, lifetime, flags ); 732 TEST_CLASSIFICATION_MACRO( 1, KEY_LIFETIME_IS_READ_ONLY, lifetime, flags ); 736 TEST_EQUAL( PSA_KEY_LIFETIME_GET_PERSISTENCE( lifetime ), persistence ); 737 TEST_EQUAL( PSA_KEY_LIFETIME_GET_LOCATION( lifetime ), location );
|
A D | test_suite_psa_crypto_se_driver_hal.data | 150 Key registration: invalid lifetime (volatile internal storage) 153 Key registration: invalid lifetime (internal storage) 156 Key registration: invalid lifetime (no registered driver)
|
/mbedtls-development/scripts/mbedtls_dev/ |
A D | psa_storage.py | 107 lifetime: Exprable = 'PSA_KEY_LIFETIME_PERSISTENT', 115 self.lifetime = as_expr(lifetime) #type: Expr 153 self.lifetime, self.type, self.bits, 169 return self.lifetime.value() >> 8 178 id=1, lifetime=0x00000001, 189 id=1, lifetime='PSA_KEY_LIFETIME_PERSISTENT',
|
/mbedtls-development/tests/scripts/ |
A D | generate_psa_tests.py | 386 key.lifetime.string, key.type.string, 403 if 'READ_ONLY' in key.lifetime.string: 406 tc.set_arguments([key.lifetime.string, 416 lifetime: str, 419 short = lifetime 425 id=1, lifetime=lifetime, 436 for lifetime in expressions: 438 if 'VOLATILE' in lifetime: 442 if 'READ_ONLY' in lifetime and self.forward: 444 yield self.key_for_lifetime(lifetime) [all …]
|
/mbedtls-development/tests/src/ |
A D | psa_exercise_key.c | 35 static int lifetime_is_dynamic_secure_element( psa_key_lifetime_t lifetime ) in lifetime_is_dynamic_secure_element() argument 37 return( PSA_KEY_LIFETIME_GET_LOCATION( lifetime ) != in lifetime_is_dynamic_secure_element() 46 psa_key_lifetime_t lifetime; in check_key_attributes_sanity() local 52 lifetime = psa_get_key_lifetime( &attributes ); in check_key_attributes_sanity() 58 if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) ) in check_key_attributes_sanity() 76 if( lifetime_is_dynamic_secure_element( lifetime ) ) in check_key_attributes_sanity()
|
/mbedtls-development/include/mbedtls/ |
A D | ssl_ticket.h | 110 uint32_t lifetime );
|