Skip to content

Commit dd94518

Browse files
committed
Note that incremental key generation might only be available for some key types.
1 parent 4f30b9b commit dd94518

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

doc/crypto/api/keys/management.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ When creating a key, the attributes for the new key are specified in a `psa_key_
159159

160160
* For RSA keys (`PSA_KEY_TYPE_RSA_KEY_PAIR`), the public exponent is 65537. The modulus is a product of two probabilistic primes between :math:`2^{n-1}` and :math:`2^n` where :math:`n` is the bit size specified in the attributes.
161161

162-
If an application requires bounded execution when generating a key, it can use an interruptible key generation operation.
162+
If an application requires bounded execution when generating a key, the implementation might provide support for interruptible key generation.
163163
See :secref:`interruptible-generate-key`.
164164

165165
.. function:: psa_copy_key
@@ -545,7 +545,11 @@ Interruptible key generation
545545
Generation of some key types can be computationally expensive.
546546
For example, RSA keys, and elliptic curve public keys.
547547

548-
An interruptible key generation operation can be used instead of calling `psa_generate_key()`, in applications that have bounded execution requirements for use cases that require key generation.
548+
For such keys, an interruptible key generation operation can be used instead of calling `psa_generate_key()`, in applications that have bounded execution requirements for use cases that require key generation.
549+
550+
.. note::
551+
An implementation of the |API| does not need to provide incremental generation for all key types supported by the implementation.
552+
Use `psa_generate_key()` to create keys for types that do not need to be incrementally generated.
549553

550554
An interruptible key generation operation is used as follows:
551555

@@ -659,7 +663,10 @@ An interruptible key generation operation is used as follows:
659663
.. retval:: PSA_ERROR_ALREADY_EXISTS
660664
This is an attempt to create a persistent key, and there is already a persistent key with the given identifier.
661665
.. retval:: PSA_ERROR_NOT_SUPPORTED
662-
The key attributes, as a whole, are not supported, either by the implementation in general or in the specified storage location.
666+
The following conditions can result in this error:
667+
668+
* The implementation does not support incremental generation of the requested key type.
669+
* The key attributes, as a whole, are not supported, either by the implementation in general or in the specified storage location.
663670
.. retval:: PSA_ERROR_INVALID_ARGUMENT
664671
The following conditions can result in this error:
665672

0 commit comments

Comments
 (0)