Lines Matching refs:key_id

142 static size_t slice_index_of_volatile_key_id(psa_key_id_t key_id)  in slice_index_of_volatile_key_id()  argument
145 return (key_id >> KEY_ID_SLOT_INDEX_WIDTH) & mask; in slice_index_of_volatile_key_id()
150 static size_t slot_index_of_volatile_key_id(psa_key_id_t key_id) in slot_index_of_volatile_key_id() argument
152 return key_id & ((1LU << KEY_ID_SLOT_INDEX_WIDTH) - 1); in slot_index_of_volatile_key_id()
231 static inline psa_key_slot_t *get_volatile_key_slot(psa_key_id_t key_id);
273 static inline psa_key_slot_t *get_volatile_key_slot(psa_key_id_t key_id) in get_volatile_key_slot() argument
275 size_t slice_idx = slice_index_of_volatile_key_id(key_id); in get_volatile_key_slot()
279 size_t slot_idx = slot_index_of_volatile_key_id(key_id); in get_volatile_key_slot()
308 static inline psa_key_slot_t *get_volatile_key_slot(psa_key_id_t key_id) in get_volatile_key_slot() argument
313 return &global_data.key_slots[key_id - PSA_KEY_ID_VOLATILE_MIN]; in get_volatile_key_slot()
333 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID(key); in psa_is_valid_key_id() local
335 if ((PSA_KEY_ID_USER_MIN <= key_id) && in psa_is_valid_key_id()
336 (key_id <= PSA_KEY_ID_USER_MAX)) { in psa_is_valid_key_id()
341 (PSA_KEY_ID_VENDOR_MIN <= key_id) && in psa_is_valid_key_id()
342 (key_id <= PSA_KEY_ID_VENDOR_MAX)) { in psa_is_valid_key_id()
387 psa_key_id_t key_id = MBEDTLS_SVC_KEY_ID_GET_KEY_ID(key); in psa_get_and_lock_key_slot_in_memory() local
391 if (psa_key_id_is_volatile(key_id)) { in psa_get_and_lock_key_slot_in_memory()
392 slot = get_volatile_key_slot(key_id); in psa_get_and_lock_key_slot_in_memory()
501 static psa_status_t psa_allocate_volatile_key_slot(psa_key_id_t *key_id, in psa_allocate_volatile_key_slot() argument
525 *key_id = volatile_key_id_of_index(slice_idx, slot_idx); in psa_allocate_volatile_key_slot()