/mbedtls-latest/tests/suites/ |
D | test_suite_psa_crypto_se_driver_hal_mocks.function | 7 /** The location and lifetime used for tests that use a single driver. */ 327 psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME; 328 psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(lifetime); 349 psa_set_key_lifetime(&attributes, lifetime); 370 TEST_ASSERT(mock_import_data.attributes.lifetime == 371 (mock_alloc_return_value == PSA_SUCCESS ? lifetime : 0)); 392 psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME; 393 psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(lifetime); 416 psa_set_key_lifetime(&attributes, lifetime); 446 psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME; [all …]
|
D | test_suite_psa_crypto_metadata.data | 431 lifetime:PSA_KEY_LIFETIME_VOLATILE:KEY_LIFETIME_IS_VOLATILE:PSA_KEY_PERSISTENCE_VOLATILE:PSA_KEY_LO… 434 lifetime:PSA_KEY_LIFETIME_PERSISTENT:0:PSA_KEY_PERSISTENCE_DEFAULT:PSA_KEY_LOCATION_LOCAL_STORAGE 437 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_VOLATILE, PSA_KEY_LOCAT… 440 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_DEFAULT, PSA_KEY_LOCATI… 443 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(2, PSA_KEY_LOCATION_LOCAL_STORAGE):0:2:PSA_… 446 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(254, PSA_KEY_LOCATION_LOCAL_STORAGE):0:254:… 449 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_READ_ONLY, PSA_KEY_LOCA… 452 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_VOLATILE, 0x123456):KEY… 455 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_PERSISTENCE_DEFAULT, 0x123456):0:PS… 458 lifetime:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(2, 0x123456):0:2:0x123456 [all …]
|
D | test_suite_psa_crypto_se_driver_hal.function | 37 /** The location and lifetime used for tests that use a single driver. */ 249 psa_key_lifetime_t lifetime; 287 ram_slots[slot_number].lifetime = psa_get_key_lifetime(attributes); 568 psa_key_lifetime_t lifetime = 572 if (PSA_KEY_LIFETIME_GET_LOCATION(lifetime) < MIN_DRIVER_LOCATION) { 880 psa_key_lifetime_t lifetime = (psa_key_lifetime_t) lifetime_arg; 881 psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(lifetime); 908 psa_set_key_lifetime(&attributes, lifetime); 915 if (PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)) { 938 if (PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)) { [all …]
|
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
|
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; 82 psa_set_key_lifetime(&attributes, lifetime);
|
D | test_suite_psa_crypto_se_driver_hal.data | 151 Key registration: invalid lifetime (volatile, in SE, id=0) 154 Key registration: invalid lifetime (volatile, in SE, id=1) 157 Key registration: invalid lifetime (volatile, internal, id=0) 160 Key registration: invalid lifetime (volatile, internal, id=1) 163 Key registration: invalid lifetime (internal storage) 166 Key registration: invalid lifetime (no registered driver)
|
D | test_suite_psa_crypto_slot_management.function | 222 psa_key_lifetime_t lifetime = lifetime_arg; 248 psa_set_key_lifetime(&attributes, lifetime); 263 TEST_EQUAL(psa_get_key_lifetime(&attributes), lifetime); 283 TEST_EQUAL(psa_get_key_lifetime(&attributes), lifetime); 375 psa_key_lifetime_t lifetime = lifetime_arg; 393 psa_set_key_lifetime(&attributes, lifetime); 420 TEST_EQUAL(psa_get_key_lifetime(&attributes), lifetime); 467 psa_key_lifetime_t lifetime = lifetime_arg; 479 psa_set_key_lifetime(&attributes, lifetime); 480 if (PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)) { [all …]
|
D | test_suite_psa_crypto_metadata.function | 65 /* Flags for lifetime classification macros. There is a flag for every 66 * lifetime classification macro PSA_KEY_LIFETIME_IS_xxx. The name of the 720 void lifetime(int lifetime_arg, int classification_flags, 723 psa_key_lifetime_t lifetime = lifetime_arg; 729 TEST_CLASSIFICATION_MACRO(1, KEY_LIFETIME_IS_VOLATILE, lifetime, flags); 730 TEST_CLASSIFICATION_MACRO(1, KEY_LIFETIME_IS_READ_ONLY, lifetime, flags); 734 TEST_EQUAL(PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime), persistence); 735 TEST_EQUAL(PSA_KEY_LIFETIME_GET_LOCATION(lifetime), location);
|
D | test_suite_psa_crypto_storage_format.function | 231 psa_key_lifetime_t lifetime = lifetime_arg; 244 psa_set_key_lifetime(&attributes, lifetime); 275 psa_key_lifetime_t lifetime = lifetime_arg; 288 psa_set_key_lifetime(&attributes, lifetime);
|
D | test_suite_psa_crypto_generate_key.function | 21 // key lifetime, usage flags, algorithm are irrelevant for this test
|
/mbedtls-latest/include/psa/ |
D | crypto_struct.h | 302 psa_key_lifetime_t MBEDTLS_PRIVATE(lifetime); 338 psa_key_lifetime_t lifetime = attributes->MBEDTLS_PRIVATE(lifetime); in psa_set_key_id() local 342 if (PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)) { in psa_set_key_id() 343 attributes->MBEDTLS_PRIVATE(lifetime) = in psa_set_key_id() 346 PSA_KEY_LIFETIME_GET_LOCATION(lifetime)); in psa_set_key_id() 365 psa_key_lifetime_t lifetime) in psa_set_key_lifetime() argument 367 attributes->MBEDTLS_PRIVATE(lifetime) = lifetime; in psa_set_key_lifetime() 368 if (PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)) { in psa_set_key_lifetime() 380 return attributes->MBEDTLS_PRIVATE(lifetime); in psa_get_key_lifetime()
|
D | crypto_values.h | 2342 #define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) \ argument 2343 ((psa_key_persistence_t) ((lifetime) & 0x000000ff)) 2345 #define PSA_KEY_LIFETIME_GET_LOCATION(lifetime) \ argument 2346 ((psa_key_location_t) ((lifetime) >> 8)) 2364 #define PSA_KEY_LIFETIME_IS_VOLATILE(lifetime) \ argument 2365 (PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \ 2385 #define PSA_KEY_LIFETIME_IS_READ_ONLY(lifetime) \ argument 2386 (PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \
|
/mbedtls-latest/library/ |
D | ssl_ticket.c | 81 key->lifetime = ctx->ticket_lifetime; in ssl_ticket_gen_key() 124 if (key->lifetime != 0) { in ssl_ticket_update_keys() 133 (uint64_t) (current_time - key_time) < key->lifetime) { in ssl_ticket_update_keys() 157 uint32_t lifetime) in mbedtls_ssl_ticket_rotate() argument 201 ctx->ticket_lifetime = lifetime; in mbedtls_ssl_ticket_rotate() 206 key->lifetime = lifetime; in mbedtls_ssl_ticket_rotate() 217 uint32_t lifetime) in mbedtls_ssl_ticket_setup() argument 257 ctx->ticket_lifetime = lifetime; in mbedtls_ssl_ticket_setup() 341 *ticket_lifetime = key->lifetime; in mbedtls_ssl_ticket_write() 507 (mbedtls_ms_time_t) key->lifetime * 1000; in mbedtls_ssl_ticket_parse()
|
D | psa_crypto_slot_management.c | 628 (!PSA_KEY_LIFETIME_IS_VOLATILE(slot->attr.lifetime))) { in psa_reserve_free_key_slot() 699 if (psa_get_se_driver(slot->attr.lifetime, &drv, &drv_context)) { in psa_load_persistent_key_into_slot() 730 psa_key_lifetime_t lifetime = PSA_KEY_LIFETIME_VOLATILE; in psa_load_builtin_key_into_slot() local 742 slot->attr.id, &lifetime, &slot_number); in psa_load_builtin_key_into_slot() 750 psa_set_key_lifetime(&attributes, lifetime); in psa_load_builtin_key_into_slot() 846 (*p_slot)->attr.lifetime = PSA_KEY_LIFETIME_PERSISTENT; in psa_get_and_lock_key_slot() 943 psa_status_t psa_validate_key_location(psa_key_lifetime_t lifetime, in psa_validate_key_location() argument 946 if (psa_key_lifetime_is_external(lifetime)) { in psa_validate_key_location() 949 psa_se_drv_table_entry_t *driver = psa_get_se_driver_entry(lifetime); in psa_validate_key_location() 968 psa_status_t psa_validate_key_persistence(psa_key_lifetime_t lifetime) in psa_validate_key_persistence() argument [all …]
|
D | psa_crypto_slot_management.h | 300 static inline int psa_key_lifetime_is_external(psa_key_lifetime_t lifetime) in psa_key_lifetime_is_external() argument 302 return PSA_KEY_LIFETIME_GET_LOCATION(lifetime) in psa_key_lifetime_is_external() 320 psa_status_t psa_validate_key_location(psa_key_lifetime_t lifetime, 331 psa_status_t psa_validate_key_persistence(psa_key_lifetime_t lifetime);
|
D | psa_crypto_storage.c | 228 uint8_t lifetime[sizeof(psa_key_lifetime_t)]; member 247 MBEDTLS_PUT_UINT32_LE(attr->lifetime, storage_format->lifetime, 0); in psa_format_key_data_for_storage() 307 attr->lifetime = MBEDTLS_GET_UINT32_LE(storage_format->lifetime, 0); in psa_parse_key_data_from_storage()
|
D | psa_crypto_se.c | 56 psa_key_lifetime_t lifetime) in psa_get_se_driver_entry() argument 59 psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION(lifetime); in psa_get_se_driver_entry() 87 int psa_get_se_driver(psa_key_lifetime_t lifetime, in psa_get_se_driver() argument 91 psa_se_drv_table_entry_t *driver = psa_get_se_driver_entry(lifetime); in psa_get_se_driver()
|
D | psa_crypto_se.h | 87 int psa_get_se_driver(psa_key_lifetime_t lifetime, 99 psa_key_lifetime_t lifetime);
|
D | psa_crypto.c | 1180 if (psa_key_lifetime_is_external((*p_slot)->attr.lifetime) in psa_get_and_lock_transparent_key_slot_with_policy() 1182 … && PSA_KEY_LIFETIME_GET_LOCATION((*p_slot)->attr.lifetime) != TFM_BUILTIN_KEY_LOADER_KEY_LOCATION in psa_get_and_lock_transparent_key_slot_with_policy() 1345 if (PSA_KEY_LIFETIME_IS_READ_ONLY(slot->attr.lifetime)) { in psa_destroy_key() 1356 driver = psa_get_se_driver_entry(slot->attr.lifetime); in psa_destroy_key() 1364 psa_crypto_transaction.key.lifetime = slot->attr.lifetime; in psa_destroy_key() 1390 if (!PSA_KEY_LIFETIME_IS_VOLATILE(slot->attr.lifetime)) { in psa_destroy_key() 1452 if (psa_get_se_driver_entry(slot->attr.lifetime) != NULL) { in psa_get_key_attributes() 1718 psa_key_lifetime_t lifetime = psa_get_key_lifetime(attributes); local 1721 status = psa_validate_key_location(lifetime, p_drv); 1726 status = psa_validate_key_persistence(lifetime); [all …]
|
/mbedtls-latest/tests/src/drivers/ |
D | platform_builtin_keys.c | 24 psa_key_lifetime_t lifetime; member 63 psa_key_lifetime_t *lifetime, in mbedtls_psa_platform_get_builtin_key() argument 73 *lifetime = builtin_key->lifetime; in mbedtls_psa_platform_get_builtin_key()
|
/mbedtls-latest/include/mbedtls/ |
D | ssl_ticket.h | 56 uint32_t MBEDTLS_PRIVATE(lifetime); 127 uint32_t lifetime); 170 uint32_t lifetime);
|
/mbedtls-latest/scripts/data_files/driver_templates/ |
D | psa_crypto_driver_wrappers.h.jinja | 171 /* Key is declared with a lifetime not known to us */ 243 /* Key is declared with a lifetime not known to us */ 356 /* Key is declared with a lifetime not known to us */ 457 /* Key is declared with a lifetime not known to us */ 549 /* Key is declared with a lifetime not known to us */ 642 /* Key is declared with a lifetime not known to us */ 830 /* Key is declared with a lifetime not known to us */ 975 /* Key is declared with a lifetime not known to us */ 1109 /* Key is declared with a lifetime not known to us */ 1193 /* Key is declared with a lifetime not known to us */ [all …]
|
D | psa_crypto_driver_wrappers_no_static.c.jinja | 85 * The key is declared with a lifetime not known to us. 187 /* Key is declared with a lifetime not known to us */
|
/mbedtls-latest/tests/src/ |
D | psa_exercise_key.c | 34 static int lifetime_is_dynamic_secure_element(psa_key_lifetime_t lifetime) in lifetime_is_dynamic_secure_element() argument 36 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 57 lifetime = psa_get_key_lifetime(&attributes); in check_key_attributes_sanity() 63 if (PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)) { in check_key_attributes_sanity() 80 if (lifetime_is_dynamic_secure_element(lifetime)) { in check_key_attributes_sanity()
|
/mbedtls-latest/docs/architecture/ |
D | mbed-crypto-storage-specification.md | 225 * The layout of a key file now has a lifetime field before the type field. 253 * Files 0xfffffe02 through 0xfffffeff (`PSA_CRYPTO_SE_DRIVER_ITS_UID_BASE + lifetime`): secure elem… 266 * lifetime (4 bytes): `psa_key_lifetime_t` value. 290 * lifetime (4 bytes): `psa_key_lifetime_t` value that corresponds to a key in a secure element. 325 * lifetime (4 bytes): `psa_key_lifetime_t` value. 416 * lifetime (4 bytes): `psa_key_lifetime_t` value. 433 * Files 0xfffffe02 through 0xfffffeff (`PSA_CRYPTO_SE_DRIVER_ITS_UID_BASE + lifetime`): dynamic sec… 454 * lifetime (4 bytes): `psa_key_lifetime_t` value that corresponds to a key in a secure element.
|