Lines Matching refs:thread
3 Currently, PSA Crypto API calls in Mbed TLS releases are not thread-safe.
5 …html#c.psa_crypto_init) thread-safe has been implemented. Implementations which only ever call PSA…
14 …testing system has now been made thread-safe. Tests can now spin up multiple threads, see [Thread-…
19 The other functions in the PSA Crypto API are planned to be made thread-safe in future, but current…
25 * The [Current strategy](#current-strategy) section describes how thread-safety of key management a…
27 * The [Future work](#future-work) section outlines our long-term goals for thread-safety; it also a…
37 …thread-safe if any valid set of concurrent calls is handled as if the effect and return code of ev…
78 …l work. Implementations which only ever call PSA functions from a single thread, or which protect …
92 …oes not exist. This is a functional requirement for persistent keys: any thread can immediately cr…
107 …thread-safe (`mbedtls_psa_random_init` and `mbedtls_psa_random_seed` are only thread-safe when cal…
109 …NAL_RNG` is enabled, it is down to the external implementation to ensure thread-safety, should thr…
115 …sa-api/crypto/1.1/api/library/library.html#c.psa_crypto_init). This is a thread-safe function, and…
119 …thread returns from creating/loading a key via a key management API call the key can be used by an…
121 …e key store - while trying to load a persistent key into the key store a thread temporarily reserv…
127 There is no thread-safe way to free all PSA resources. This is because any such operation would nee…
129 `mbedtls_psa_crypto_free` must only be called by a single thread once all threads have completed th…
133 …cribes how we have implemented thread-safety. There is discussion of: techniques, internal propert…
139 …tex` defined in `include/mbedtls/threading.h`, which is used to make `psa_crypto_init` thread-safe.
143 …s within this struct are not protected by this mutex, and are not always thread-safe (see [Random …
148 A deadlock would occur if a thread attempts to lock a mutex while already holding it. Functions whi…
163 * `PSA_SLOT_EMPTY`: no thread is currently accessing the slot, and no information is stored in the …
164 * `PSA_SLOT_FILLING`: one thread is currently loading or creating material to fill the slot, this t…
165 * `PSA_SLOT_FULL`: the slot contains a key, and any thread is able to use the key after registering…
166 …ked for destruction, but at least one thread is still registered as a reader (`registered_readers …
188 A thread can only traverse the key store while holding `mbedtls_threading_key_slot_mutex`, the set …
207 … This second step is not done under the mutex, at this point the calling thread has exclusive acce…
208 …thread calls `psa_finish_key_creation`. This function takes the mutex, checks that the key does no…
209 …pes the slot, and releases the mutex. Immediately after this unlock, any thread can start to use t…
213 …tire sequence is done during a single mutex lock, which is necessary for thread-safety (see docume…
221 …_get_and_lock_key_slot_X` functions, which then finds the key and registers the thread as a reader.
225 …thread unregisters from reading the key (the operations do not access the key slots again). The co…
229 …rypto.c`. The destroying thread (the thread calling `psa_destroy_key`) does not always wipe the ke…
231 … 1. This implements a "last one out closes the door" approach. The final thread to unregister from…
249 …idered thread-safe, as we have not yet tested whether they rely on unprotected global resources. T…
255 … multiple threads. This work has made the global variables used in tests thread-safe. If multiple …
257 Although the `step` feature used in some tests is thread-safe, it may produce unexpected results fo…
265 …e, and test that our key slot state system is enforced. We also test the thread-safety of `psa_cry…
267 …harge of locking mutexes and interacting with the key store; we test the thread-safety of these fu…
285 …h re-loading keys which cannot otherwise be avoided without changing our approach to thread-safety.
292 As explained previously, we eventually aim to make the entirety of the PSA API thread-safe. This wi…
308 …oes not exist. This is a functional requirement for persistent keys: any thread can immediately cr…
318 …* When a thread calls `psa_destroy_key`, they continue as normal until the `psa_unregister_read` c…
319 …g `psa_unregister_read`, the thread waits until the condition `slot->registered_readers == 1` is t…
320 * At this point, the destroying thread directly calls `psa_wipe_key_slot`.
325 …the key slot will need to be removed, slot wiping is now only done by the destroying/wiping thread.
341 * Even with a thread-safe driver, the core never starts the destruction of a key while there are op…
343 In the non-thread-safe case we have these natural assumptions/requirements:
352 1. Non-thread-safe drivers must not call the core.
361 A driver would be non-thread-safe if the `thread-safe` property is set to true.
363 …trancy in non-thread-safe drivers work, thread-safe drivers must not make a call to the core when …