You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/crypto/api/keys/policy.rst
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,8 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`.
101
101
- `PSA_KEY_USAGE_VERIFY_HASH`
102
102
- `PSA_KEY_USAGE_DERIVE`
103
103
- `PSA_KEY_USAGE_VERIFY_DERIVATION`
104
+
- `PSA_KEY_USAGE_WRAP`
105
+
- `PSA_KEY_USAGE_UNWRAP`
104
106
105
107
The flag `PSA_KEY_USAGE_DERIVE_PUBLIC` is used in the function `psa_check_key_usage()` to query if a key can be used for the public role in the specified algorithm.
106
108
@@ -293,6 +295,27 @@ The usage flags are encoded in a bitmask, which has the type `psa_key_usage_t`.
293
295
The key must have the `PSA_KEY_USAGE_DERIVE` permission.
294
296
* `PSA_ALG_HKDF` is invalid, as there is no such role in single-key derivation algorithms.
295
297
298
+
.. macro:: PSA_KEY_USAGE_WRAP
299
+
:definition: ((psa_key_usage_t)0x00010000)
300
+
301
+
.. summary::
302
+
Permission to wrap another key with the key.
303
+
304
+
This flag is required to use the key in a key-wrapping operation.
305
+
The flag must be present on keys used with the following APIs:
306
+
307
+
* `psa_wrap_key()`
308
+
309
+
.. macro:: PSA_KEY_USAGE_UNWRAP
310
+
:definition: ((psa_key_usage_t)0x00020000)
311
+
312
+
.. summary::
313
+
Permission to unwrap another key with the key.
314
+
315
+
This flag is required to use the key in a key-unwrapping operation.
316
+
The flag must be present on keys used with the following APIs:
Copy file name to clipboardExpand all lines: doc/crypto/api/ops/algorithms.rst
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ The specific algorithm identifiers are described alongside the cryptographic ope
20
20
* :secref:`mac-algorithms`
21
21
* :secref:`cipher-algorithms`
22
22
* :secref:`aead-algorithms`
23
+
* :secref:`key-wrapping-algorithms`
23
24
* :secref:`key-derivation-algorithms`
24
25
* :secref:`sign`
25
26
* :secref:`asymmetric-encryption-algorithms`
@@ -141,6 +142,20 @@ Algorithm categories
141
142
142
143
See :secref:`aead-algorithms` for a list of defined AEAD algorithms.
143
144
145
+
.. macro:: PSA_ALG_IS_KEY_WRAP
146
+
:definition: /* specification-defined value */
147
+
148
+
.. summary::
149
+
Whether the specified algorithm is a key wrapping algorithm.
150
+
151
+
.. param:: alg
152
+
An algorithm identifier: a value of type `psa_algorithm_t`.
153
+
154
+
.. return::
155
+
``1`` if ``alg`` is a key-wrapping algorithm, ``0`` otherwise. This macro can return either ``0`` or ``1`` if ``alg`` is not a supported algorithm identifier.
156
+
157
+
See :secref:`key-wrapping-algorithms` for a list of defined key-wrapping algorithms.
0 commit comments