Lines Matching refs:file

21 ## Assumptions on the underlying file storage
25 * `set()` writes a whole file (either creating it, or replacing the previous content).
26 * `remove()` removes a file (returning a specific error code if the file does not exist).
30 …mic, the content of a file is always a version that was previously passed to `set()`. We do not tr…
40 …ence properties of the underyling storage](#assumptions-on-the-underlying-file-storage). We do not…
111 The PSA ITS API does not support enumerating files in storage: an ITS call can only access one file
115 … underlying file storage](#assumptions-on-the-underlying-file-storage), each atomic operation in t…
117 …st transform the internal storage from a state where file `id` does not exist, to a state where fi…
121file `id` cannot be used for this purpose because there is no way to enumerate all keys (and even …
123 * Write (create or update) a file `t` referencing `id`.
127 …it-with-stateful-secure-elements) follow this pattern, with `t` being the file containing the tran…
167 …on to store in the key file once the `"allocate_key"` call returns. We must store all the informat…
171 3. Write the key file.
178 * If the key does not exist in the secure element, first remove the key file if it is present, then…
180 For key destruction, we need to preserve the key file until after the key has been destroyed. There…
184 3. Remove the key file.
189 …ement, call the driver's `"destroy_key"` entry point, then remove the key file, and finally remote…
190 * If the key does not exist in the secure element, remove the key file if it is still present, then…
201 4. Write the key file.
204 For key destruction, we can remove the key file before contacting the secure element. Therefore the…
207 2. Remove the key file.
213 1. Remove the key file, treating `DOES_NOT_EXIST` as a success.
217 #### Always-destroy strategy with a simpler transaction file
219file simpler: if we ensure that the key file always exists if the key exists in the secure element…
225 3. Write the key file.
229 For key destruction, we need to contact the secure element before removing the key file. Therefore …
233 3. Remove the key file.
238 1. Load the driver key identifier from the key file. If the key file does not exist, skip to step 4.
240 3. Remove the key file, treating `DOES_NOT_EXIST` as a success.
245 * The transaction file handling is simpler since its entries have a fixed size.
301 …ut active transactions is stored in a transaction list file. The name of the transaction list file
303 …then the key must be present in the secure element if and only if the key file is in the internal …
305file contains the driver key identifier, or if the driver key identifier is only stored in the key…
307 …he location of the secure element if this is not encoded in the name of the transaction list file).
313 * If the file `id` does not exist, then no resources corresponding to that key are in a secure elem…
314 * If `id` is not in the transaction list and the file `id` exists and references a key in a statefu…
316 If `id` is in the transaction list and the file `id` exists, the key may or may not be present in t…
322 * If the file `id` does not exist, then nothing needs to be done for recovery, other than removing …
323 * If the file `id` exists:
331 * If `id` is not in the transaction list and the file `id` does not exist, then no resources corres…
332 * If `id` is not in the transaction list and the file `id` exists, then the key is present in the s…
338 * If the file `id` does not exist, then destroy the key in the secure element (treating a `DOES_NOT…
339 * If the file `id` exists:
347 * Whether the key file exists.
365 In addition, before or after step 2, create or remove the key file in the internal storage.
369 * During key creation, create the key file in internal storage in the internal storage before calli…
370 … the secure element's key destruction entry point before removing the key file in internal storage.
378 * If the file `id` does not exist, then no resources corresponding to that key are in a secure elem…
379 * If `id` is not in the transaction list and the file `id` exists and references a key in a statefu…
384 … recovery strategy with a simple transaction file](#always-destroy-strategy-with-a-simpler-transac…
386 * If the file `id` does not exist, then nothing needs to be done for recovery, other than removing …
387 * If the file `id` exists, call the secure element's key destruction entry point (treating a `DOES_…
393 ### Transaction list file manipulation
401 3. Write the updated list file.
405 1. Load the current list if it is not already cached in memory. It is an error if the file does not…
407 …the list is now empty, remove the transaction list file. Otherwise write the updated list to the f…
414 2. Add _A_ [to the transaction list file](#transaction-list-file-manipulation).
415file _A_ in the internal storage. Note that this is done at a different time from what happens whe…
417 5. Remove _A_ [from the transaction list file](#transaction-list-file-manipulation).
422 * If the key file has been created in the internal storage, remove it.
433 1. Add _A_ [to the transaction list file](#transaction-list-file-manipulation).
435 3. Remove the key file _A_ from the internal storage.
436 4. Remove _A_ [from the transaction list file](#transaction-list-file-manipulation).
443 For each key _A_ in the transaction list file, if the file _A_ exists in the internal storage:
447 3. Remove the key file _A_ from the internal storage.
448 4. Remove _A_ [from the transaction list file](#transaction-list-file-manipulation).
451 The transaction list file can be processed in any order.
453 …on list after recovering each key, or to only delete the transaction list file once the recovery i…
455 ### Concrete format of the transaction list file
457 The transaction list file contains a [fixed header](#transaction-list-header-format) followed by a …
459 The file uid is `PSA_CRYPTO_ITS_TRANSACTION_LIST_UID` = 0xffffff53.
463 …t two bytes of a [dynamic secure element transaction file](#dynamic-secure-element-transaction-fil…
480 #### Dynamic secure element transaction file argument
482file” (`PSA_CRYPTO_ITS_TRANSACTION_UID` = 0xffffff54), used by dynamic secure elements (feature en…
484 For the new kind of secure element driver, we pick a different file name to avoid any mixup.
492 …`psa_its_set()` or `psa_its_remove()` also calls a test hook, passing the file UID as an argument …
500 * When invoked from the test hook on a key file: on that key.
501 …hen invoked from the test hook on the transaction file: on all the keys listed in the transaction
510 When no secure element driver is present in the build, the presence of a transaction list file duri…
517 * Create a transaction list file with a certain content.
528 * Key file: present, absent.
530 * Key in the transaction file: no, creation (import), destruction.