Home
last modified time | relevance | path

Searched refs:slot (Results 1 – 25 of 26) sorted by relevance

12

/mbedtls-3.5.0/library/
Dpsa_crypto_slot_management.c103 psa_key_slot_t *slot = NULL; in psa_get_and_lock_key_slot_in_memory() local
106 slot = &global_data.key_slots[key_id - PSA_KEY_ID_VOLATILE_MIN]; in psa_get_and_lock_key_slot_in_memory()
116 status = mbedtls_svc_key_id_equal(key, slot->attr.id) ? in psa_get_and_lock_key_slot_in_memory()
124 slot = &global_data.key_slots[slot_idx]; in psa_get_and_lock_key_slot_in_memory()
125 if (mbedtls_svc_key_id_equal(key, slot->attr.id)) { in psa_get_and_lock_key_slot_in_memory()
134 status = psa_lock_key_slot(slot); in psa_get_and_lock_key_slot_in_memory()
136 *p_slot = slot; in psa_get_and_lock_key_slot_in_memory()
157 psa_key_slot_t *slot = &global_data.key_slots[slot_idx]; in psa_wipe_all_key_slots() local
158 slot->lock_count = 1; in psa_wipe_all_key_slots()
159 (void) psa_wipe_key_slot(slot); in psa_wipe_all_key_slots()
[all …]
Dpsa_crypto_core.h115 static inline int psa_is_key_slot_occupied(const psa_key_slot_t *slot) in psa_is_key_slot_occupied() argument
117 return slot->attr.type != 0; in psa_is_key_slot_occupied()
128 static inline int psa_is_key_slot_locked(const psa_key_slot_t *slot) in psa_is_key_slot_locked() argument
130 return slot->lock_count > 0; in psa_is_key_slot_locked()
141 static inline uint16_t psa_key_slot_get_flags(const psa_key_slot_t *slot, in psa_key_slot_get_flags() argument
144 return slot->attr.flags & mask; in psa_key_slot_get_flags()
153 static inline void psa_key_slot_set_flags(psa_key_slot_t *slot, in psa_key_slot_set_flags() argument
157 slot->attr.flags = ((~mask & slot->attr.flags) | in psa_key_slot_set_flags()
166 static inline void psa_key_slot_set_bits_in_flags(psa_key_slot_t *slot, in psa_key_slot_set_bits_in_flags() argument
169 slot->attr.flags |= mask; in psa_key_slot_set_bits_in_flags()
[all …]
Dpsa_crypto.c583 psa_status_t psa_allocate_buffer_to_slot(psa_key_slot_t *slot, in psa_allocate_buffer_to_slot() argument
586 if (slot->key.data != NULL) { in psa_allocate_buffer_to_slot()
590 slot->key.data = mbedtls_calloc(1, buffer_length); in psa_allocate_buffer_to_slot()
591 if (slot->key.data == NULL) { in psa_allocate_buffer_to_slot()
595 slot->key.bytes = buffer_length; in psa_allocate_buffer_to_slot()
599 psa_status_t psa_copy_key_material_into_slot(psa_key_slot_t *slot, in psa_copy_key_material_into_slot() argument
603 psa_status_t status = psa_allocate_buffer_to_slot(slot, in psa_copy_key_material_into_slot()
609 memcpy(slot->key.data, data, data_length); in psa_copy_key_material_into_slot()
954 psa_key_slot_t *slot = NULL; in psa_get_and_lock_key_slot_with_policy() local
960 slot = *p_slot; in psa_get_and_lock_key_slot_with_policy()
[all …]
Dpsa_crypto_slot_management.h140 static inline psa_status_t psa_lock_key_slot(psa_key_slot_t *slot) in psa_lock_key_slot() argument
142 if (slot->lock_count >= SIZE_MAX) { in psa_lock_key_slot()
146 slot->lock_count++; in psa_lock_key_slot()
167 psa_status_t psa_unlock_key_slot(psa_key_slot_t *slot);
Dcipher.c160 (void) psa_destroy_key(cipher_psa->slot); in mbedtls_cipher_free()
304 &cipher_psa->slot); in mbedtls_cipher_setkey()
1235 cipher_psa->slot, in mbedtls_cipher_crypt()
1239 cipher_psa->slot, in mbedtls_cipher_crypt()
1332 status = psa_aead_encrypt(cipher_psa->slot, in mbedtls_cipher_aead_encrypt()
1409 status = psa_aead_decrypt(cipher_psa->slot, in mbedtls_cipher_aead_decrypt()
Dcipher_wrap.h129 mbedtls_svc_key_id_t slot; member
Dpsa_crypto_storage.h299 psa_key_slot_number_t slot; member
Dssl_msg.c154 uint8_t slot);
5815 uint8_t slot) in ssl_buffering_free_slot() argument
5818 mbedtls_ssl_hs_buffer * const hs_buf = &hs->buffering.hs[slot]; in ssl_buffering_free_slot()
5820 if (slot >= MBEDTLS_SSL_MAX_BUFFERED_HS) { in ssl_buffering_free_slot()
/mbedtls-3.5.0/tests/suites/
Dtest_suite_psa_crypto_slot_management.data1 Transient slot, check after closing
4 Transient slot, check after closing and restarting
7 Transient slot, check after destroying
10 Transient slot, check after destroying and restarting
13 Transient slot, check after restart with live handles
16 Persistent slot, check after closing, id=min
19 Persistent slot, check after closing and restarting, id=min
22 Persistent slot, check after destroying, id=min
25 Persistent slot, check after destroying and restarting, id=min
28 Persistent slot, check after purging, id=min
[all …]
Dtest_suite_psa_crypto_se_driver_hal.data30 SE key import-export persistent (p_allocate allows 1 slot)
33 SE key import-export persistent, check after restart (slot 0)
36 SE key import-export persistent, check after restart (slot 3)
42 SE key import-export volatile (p_allocate allows 1 slot)
45 SE key import-export volatile, check after restart (slot 0)
48 SE key import-export volatile, check after restart (slot 3)
51 Key creation in a specific slot (0)
54 Key creation in a specific slot (max)
57 Key creation in a specific slot (0, restart)
60 Key creation in a specific slot (max, restart)
[all …]
Dtest_suite_psa_crypto_attributes.function100 /* Initially, there is no slot number. */
104 /* Test setting a slot number. */
109 /* Test changing the slot number. */
114 /* Test clearing the slot number. */
124 /* Test that reset clears the slot number. */
Dtest_suite_psa_crypto_se_driver_hal.function129 /* Validate a choice of slot number as directed. */
147 /* Allocate slot numbers with a monotonic counter. */
453 ram_slot_t *slot;
460 slot = &ram_slots[slot_number];
464 psa_set_key_type(&attributes, slot->type);
466 slot->content,
467 PSA_BITS_TO_BYTES(slot->bits),
486 ram_slot_t *slot;
493 slot = &ram_slots[slot_number];
497 psa_set_key_type(&attributes, slot->type);
[all …]
Dtest_suite_psa_crypto_init.data16 No key slot access without init
22 No key slot access after deinit
Dtest_suite_psa_crypto_slot_management.function381 /* Attempt to create a new key in the same slot. */
515 /* Populate the source slot. */
530 /* Prepare the target slot. */
553 /* Test that the target slot has the expected content. */
639 /* Populate the source slot. */
651 /* Populate the target slot. */
675 /* Test that the target slot is unaffected. */
907 * slots when creating the last key is restored in a RAM slot to export
978 * persistent key description in a slot to be able to access it.
1003 * by the persistent key and the volatile keys and the slot containing the
Dtest_suite_psa_crypto_attributes.data26 PSA key attributes: slot number
Dtest_suite_psa_crypto_persistent_key.function181 /* Check key slot storage is removed */
188 /* Create another key in the same slot */
Dtest_suite_psa_crypto.function281 /* Assert that a key isn't reported as having a slot number. */
2469 /* Test that the target slot has the expected content and policy. */
9774 /* Check key slot still contains key data */
/mbedtls-3.5.0/programs/ssl/
Dssl_server2.c951 mbedtls_svc_key_id_t slot; member
966 mbedtls_svc_key_id_t const slot = head->slot; in psk_free() local
968 if (MBEDTLS_SVC_KEY_ID_GET_KEY_ID(slot) != 0) { in psk_free()
969 status = psa_destroy_key(slot); in psk_free()
1041 if (MBEDTLS_SVC_KEY_ID_GET_KEY_ID(cur->slot) != 0) { in psk_callback()
1042 return mbedtls_ssl_set_hs_psk_opaque(ssl, cur->slot); in psk_callback()
1135 unsigned slot; member
1163 unsigned slot; in ssl_async_start() local
1179 for (slot = 0; slot < config_data->slots_used; slot++) { in ssl_async_start()
1181 config_data->slots[slot].pk, in ssl_async_start()
[all …]
Dssl_client2.c776 mbedtls_svc_key_id_t slot = MBEDTLS_SVC_KEY_ID_INIT; in main() local
1970 status = psa_import_key(&key_attributes, psk, psk_len, &slot); in main()
1976 if ((ret = mbedtls_ssl_conf_psk_opaque(&conf, slot, in main()
3090 status = psa_destroy_key(slot); in main()
3094 (unsigned) MBEDTLS_SVC_KEY_ID_GET_KEY_ID(slot), in main()
/mbedtls-3.5.0/docs/architecture/
Dmbed-crypto-storage-specification.md26 * [Persistent transparent keys](#key-file-format-for-0.1.0) designated by a [slot number](#key-name…
224 …ferences to keys in a secure element. In such key files, the key material contains the slot number.
273 * For an opaque key (key in a secure element): slot number (8 bytes), in platform endianness.
289 * slot number (8 bytes): `psa_key_slot_number_t` value. This is the unique designation of the key f…
295 * The slot in the secure element designated by the slot number.
299 * The slot in the secure element designated by the slot number.
333 * For an opaque key (key in a secure element): slot number (8 bytes), in platform endianness.
358 …ically registered drivers (`MBEDTLS_PSA_CRYPTO_SE_C`). The driver picks a slot number which is sto…
424 …* For an opaque key (key in a dynamic secure element): slot number (8 bytes), in platform endianne…
453 * slot number (8 bytes): `psa_key_slot_number_t` value. This is the unique designation of the key f…
[all …]
Dpsa-crypto-implementation-structure.md62 …2. Call psa_start_key_creation() that allocates a key slot, prepares it with the specified key att…
63 …3. Generate or copy the key material into the key slot. This entails the allocation of the buffer …
66 …t step 3 or 4, psa_fail_key_creation() is called. It wipes and cleans the slot especially the key …
/mbedtls-3.5.0/scripts/data_files/driver_templates/
Dpsa_crypto_driver_wrappers.c.jinja143 /* Key is stored in the slot in export representation, so
217 /* Key is stored in the slot in export representation, so
304 /* Key is stored in the slot in export representation, so
388 /* Key is stored in the slot in export representation, so
498 /* Key is stored in the slot in export representation, so
598 /* Key is stored in the slot in export representation, so
901 /* Key is stored in the slot in export representation, so
1031 /* Key is stored in the slot in export representation, so
1162 /* Key is stored in the slot in export representation, so
1252 /* Key is stored in the slot in export representation, so
[all …]
/mbedtls-3.5.0/docs/architecture/psa-migration/
Dstrategy.md457 memory controlled by the PK layer as opposed to a PSA key slot, moving it to a
458 slot only when needed (see current `ecdsa_verify_wrap` when
464 bytes in the X.509 CRT structure, and only moved to a PK context / PSA slot
/mbedtls-3.5.0/docs/proposed/
Dpsa-driver-interface.md770 …idual keys. The representation of a key is an identifier such as label or slot number. The core st…
865 …ains an internal identifier for the key. This may be, for example, a unique label or a slot number.
897slot numbers which is stored either in the secure element or in the driver's persistent storage. T…
898 …e secure element or in the driver's persistent storage. To allocate a key slot, increment the coun…
977slot number**. Drivers that support built-in keys must provide a `"get_builtin_key"` entry point t…
/mbedtls-3.5.0/docs/architecture/testing/
Ddriver-interface-test-strategy.md69 * Check the consequence of errors detected at each stage (slot number allocation or validation, key…

12