Skip to content

Commit ec1e4cd

Browse files
committed
Xref interruptible operations from key usage flags
1 parent e35976c commit ec1e4cd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

doc/crypto/api/keys/policy.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`.
181181
* `psa_mac_compute()`
182182
* `psa_mac_sign_setup()`
183183
* `psa_sign_message()`
184+
* `psa_sign_interruptible_setup()`, when signing a message.
184185

185186
For a key pair, this concerns the private key.
186187

@@ -195,6 +196,7 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`.
195196
* `psa_mac_verify()`
196197
* `psa_mac_verify_setup()`
197198
* `psa_verify_message()`
199+
* `psa_verify_interruptible_setup()`, when verifying the signature of a message.
198200

199201
For a key pair, this concerns the public key.
200202

@@ -204,7 +206,10 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`.
204206
.. summary::
205207
Permission to sign a message hash with the key.
206208

207-
This flag is required to use the key to sign a message hash in an asymmetric signature operation. The flag must be present on keys used when calling `psa_sign_hash()`.
209+
This flag is required to use the key to sign a pre-computed message hash in an asymmetric signature operation. The flag must be present on keys used with the following APIs:
210+
211+
* `psa_sign_hash()`
212+
* `psa_sign_interruptible_setup()` when signing a pre-computed hash.
208213

209214
This flag automatically sets `PSA_KEY_USAGE_SIGN_MESSAGE`: if an application sets the flag `PSA_KEY_USAGE_SIGN_HASH` when creating a key, then the key always has the permissions conveyed by `PSA_KEY_USAGE_SIGN_MESSAGE`, and the flag `PSA_KEY_USAGE_SIGN_MESSAGE` will also be present when the application queries the usage flags of the key.
210215

@@ -216,7 +221,10 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`.
216221
.. summary::
217222
Permission to verify a message hash with the key.
218223

219-
This flag is required to use the key to verify a message hash in an asymmetric signature verification operation. The flag must be present on keys used when calling `psa_verify_hash()`.
224+
This flag is required to use the key to verify a pre-computed message hash in an asymmetric signature verification operation. The flag must be present on keys used with the following APIs:
225+
226+
* `psa_verify_hash()`
227+
* `psa_verify_interruptible_setup()`, when verifying the signature of a pre-computed hash.
220228

221229
This flag automatically sets `PSA_KEY_USAGE_VERIFY_MESSAGE`: if an application sets the flag `PSA_KEY_USAGE_VERIFY_HASH` when creating a key, then the key always has the permissions conveyed by `PSA_KEY_USAGE_VERIFY_MESSAGE`, and the flag `PSA_KEY_USAGE_VERIFY_MESSAGE` will also be present when the application queries the usage flags of the key.
222230

0 commit comments

Comments
 (0)