mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
psa: Add DH key exchange keys
Add the ability to specify Diffie-Hellman key exchange keys. Specify the import/export format as well, even though importing and exporting isn't implemented yet.
This commit is contained in:
committed by
Gilles Peskine
parent
1308fb517f
commit
8851c40d85
@ -497,6 +497,15 @@
|
||||
#define PSA_ECC_CURVE_CURVE25519 ((psa_ecc_curve_t) 0x001d)
|
||||
#define PSA_ECC_CURVE_CURVE448 ((psa_ecc_curve_t) 0x001e)
|
||||
|
||||
/** Diffie-Hellman key exchange public key. */
|
||||
#define PSA_KEY_TYPE_DH_PUBLIC_KEY ((psa_key_type_t)0x60040000)
|
||||
/** Diffie-Hellman key exchange key pair (private and public key). */
|
||||
#define PSA_KEY_TYPE_DH_KEYPAIR ((psa_key_type_t)0x70040000)
|
||||
/** Whether a key type is a Diffie-Hellman key exchange key (pair or
|
||||
* public-only). */
|
||||
#define PSA_KEY_TYPE_IS_DH(type) \
|
||||
(PSA_KEY_TYPE_PUBLIC_KEY_OF_KEYPAIR(type) == PSA_KEY_TYPE_DH_PUBLIC_KEY)
|
||||
|
||||
/** The block size of a block cipher.
|
||||
*
|
||||
* \param type A cipher key type (value of type #psa_key_type_t).
|
||||
|
Reference in New Issue
Block a user