Skip to content

Commit ec1b1ba

Browse files
Declare PSA_KEY_ID_WRAP_BOUND
Declare a key binding key that implementations are encouraged to provide.
1 parent 3cb715b commit ec1b1ba

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

include/psa/crypto.h

+4
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,10 @@ psa_status_t psa_export_public_key(psa_key_handle_t handle,
868868
* The policy on the key must have the usage flag
869869
* #PSA_KEY_USAGE_EXPORT_WRAPPED set.
870870
*
871+
* \note This specification does not currently provide a way to
872+
* create a wrapping key. Many implementations provide a
873+
* predefined wrapping key #PSA_KEY_ID_WRAP_BOUND.
874+
*
871875
* \param wrapping_key Handle to the key to wrap with.
872876
* \param handle Handle to the key to export in wrapped form.
873877
* \param[out] data Buffer where the wrapped key data is to be written.

include/psa/crypto_values.h

+16
Original file line numberDiff line numberDiff line change
@@ -1571,6 +1571,22 @@
15711571
*/
15721572
#define PSA_KEY_ID_VENDOR_MAX ((psa_app_key_id_t)0x7fffffff)
15731573

1574+
/** A key wrapping key suitable for keys managed directly by the
1575+
* PSA Cryptography implementation.
1576+
*
1577+
* Applications may use this key with psa_wrap_key_with_policy() and
1578+
* psa_unwrap_key_with_policy() to back up a key that has the
1579+
* #PSA_KEY_USAGE_BACKUP usage flag and later restore it on the same device,
1580+
* if the implementation supports it.
1581+
*
1582+
* The existence of this key is optional. Implementations that support
1583+
* key wrapping should offer a key with this identifier if having a
1584+
* single wrapping key makes sense in the scenarios where this implementation
1585+
* is used. If this key exists, it must be private to the device, i.e. it
1586+
* must not be shared with any other device or entity.
1587+
*/
1588+
#define PSA_KEY_ID_WRAP_BOUND ((psa_app_key_id_t)0x80000062)
1589+
15741590
/**@}*/
15751591

15761592
/** \defgroup policy Key policies

0 commit comments

Comments
 (0)