Skip to content

Commit 96fa056

Browse files
committed
Provide additional examples of crypto subsystem dependencies.
1 parent 9956271 commit 96fa056

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

doc/crypto/api/library/library.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,15 @@ If the application calls any function that returns a :code:`psa_status_t` result
226226
Applications may call this function on the same subsystem more than once.
227227
Once a call succeeds, subsequent calls with the same subsystem are guaranteed to succeed.
228228

229-
Initializing a subsystem may initialize other subsystems if the implementations needs them internally.
230-
For example, in a typical client-server implementation, `PSA_CRYPTO_SUBSYSTEM_COMMUNICATION` is required for all other subsystems, and therefore initializing any other subsystem also initializes `PSA_CRYPTO_SUBSYSTEM_COMMUNICATION`.
229+
Initializing a subsystem may initialize other subsystems if the implementation needs them internally.
230+
For example:
231+
232+
* In a typical client-server implementation, `PSA_CRYPTO_SUBSYSTEM_COMMUNICATION` is required for all other subsystems, and therefore initializing any other subsystem also initializes `PSA_CRYPTO_SUBSYSTEM_COMMUNICATION`.
233+
* In a system where the random bit generator is provided by a secure element, initializing `PSA_CRYPTO_SUBSYSTEM_RANDOM` can also initialize `PSA_CRYPTO_SUBSYSTEM_SECURE_ELEMENTS`.
234+
* In a system where protected communication with a secure element requires a per-session key, initializing `PSA_CRYPTO_SUBSYSTEM_SECURE_ELEMENTS` can also initialize `PSA_CRYPTO_SUBSYSTEM_RANDOM`.
235+
236+
.. warning::
237+
Application code that depends on the initialization dependencies of a specific implementation or system, might not be directly portable to other implementations.
231238

232239
Calling `psa_crypto_init_subsystem()` with for a subsystem that is not used by the implementation must have no effect, and return :code:`PSA_SUCCESS`.
233240
In effect, this is indicating that there is no further initialization required for this subsystem.

0 commit comments

Comments
 (0)