Lines Matching refs:slot

12 ## Key slot management interface
16 The **key store** consists of a collection of **key slots**. Each key slot contains the metadata fo…
18 A key slot has the type `psa_key_slot_t`. The key store is a global object which is private inside …
20 ### Key slot entry points
22 The following operations allocate a key slot by calling `psa_reserve_free_key_slot()`:
27 The following operations free a key slot by calling `psa_wipe_key_slot()` and, if applicable, `psa_…
40 ### Key slot states
42 The state of a key slot is indicated by its `state` field of type `psa_key_slot_state_t`, which can…
44 * `PSA_SLOT_EMPTY`: a slot that occupies memory but does not currently contain a key.
45 * `PSA_SLOT_FILLING`: a slot that is being filled to create or load a key.
46 * `PSA_SLOT_FULL`: a slot containing a key.
47 * `PSA_SLOT_PENDING_DELETION`: a slot whose key is being destroy or purged.
49 …oncurrency) below and [key slot states in the PSA thread safety specification](psa-thread-safety/p…
53slot is protected by a reader-writer lock. (In earlier versions, the key store was not thread-safe…
55 * `EMPTY` or `FULL` state, `registered_readers == 0`: the slot is not in use by any thread.
56 * `FULL` state, `registered_readers != 0`: the slot is being read.
57 * `FILLING` or `PENDING_DELETION` state: the slot is being written.
61 Note that a slot must not be moved in memory while it is being read or written.
63 ## Key slot management implementations
70 … allocated array of slots, of size `MBEDTLS_PSA_KEY_SLOT_COUNT`. Each key slot contains the key re…
81slot pointers while a slot may be accessed by another thread (see [“Concurrency”](#concurrency)). …
85 Some parts of the key slot management code use **key slices** as an abstraction. A key slice is an …
90 #### Key identifiers and slot location
92slot and index of the slot in its slice determine the key identifier. When accessing a volatile ke…
98 …ata is directly inside the slot, and limited to `MBEDTLS_PSA_KEY_SLOT_BUFFER_SIZE` bytes. With the…
106slot array until it finds one that is empty. If there are none, the code looks for a persistent ke…
108 #### Freeing a key slot with a static key store
110 …y by freeing any associated resources, then setting the key slot to the empty state. The slot is t…
118 #### Dynamic key slot performance characteristics
129 The key slot is organized in slices, which are dynamically arrays of key slot. The number of slices…
137 A volatile key identifier encodes the slice index and the slot index at separate bit positions. Tha…
139 #### From key slot to key slice
141slot management code need to determine which key slice contains a key slot when given a pointer to…
144 * for a persistent key identifier or built-in key identifier, [the slot is in the sole cache slice]…
146 Nonetheless, we store the slice index as a field in the slot, for two reasons:
149slot to slice correspondence to work even if the key identifier field has not been filled yet or h…
155 …e slot index to 2^25-1 so that the [encoding of volatile key identifiers](#volatile-key-identifier…
161 …e list heads, i.e. the index of a free slot in the slice. Each free slot contains the index of the…
163slot does not actually contain the index of the next slot, but the index of the next free slot on …
165 #### Dynamic key slot allocation
169 The newly allocated slot is removed from the slice's free list.
173 #### Dynamic key slot deallocation
175 …y_slot()` calls `psa_free_key_slot()`. This function adds the newly freed slot to the head of the …
196 With the [static key store](#static-key-store), a non-empty slot can contain either a volatile key …
206 A key slot must be allocated in the cache slice:
214 … no tracking of a key's usage frequency or age. The slot eviction code picks the first evictable s…