mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Rename DH Family Macros According to PSA Spec
Rename PSA_DH_GROUP_xxx to PSA_DH_FAMILY_xxx, also rename PSA_KEY_TYPE_GET_GROUP to PSA_KEY_TYPE_DH_GET_FAMILY and rename psa_dh_group_t to psa_dh_family_t. Old defines are provided in include/crypto_compat.h for backward compatibility. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
@ -536,14 +536,14 @@
|
||||
#define PSA_KEY_TYPE_DH_GROUP_MASK ((psa_key_type_t)0x00ff)
|
||||
/** Diffie-Hellman key pair.
|
||||
*
|
||||
* \param group A value of type ::psa_dh_group_t that identifies the
|
||||
* \param group A value of type ::psa_dh_family_t that identifies the
|
||||
* Diffie-Hellman group to be used.
|
||||
*/
|
||||
#define PSA_KEY_TYPE_DH_KEY_PAIR(group) \
|
||||
(PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group))
|
||||
/** Diffie-Hellman public key.
|
||||
*
|
||||
* \param group A value of type ::psa_dh_group_t that identifies the
|
||||
* \param group A value of type ::psa_dh_family_t that identifies the
|
||||
* Diffie-Hellman group to be used.
|
||||
*/
|
||||
#define PSA_KEY_TYPE_DH_PUBLIC_KEY(group) \
|
||||
@ -563,8 +563,8 @@
|
||||
PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE)
|
||||
|
||||
/** Extract the group from a Diffie-Hellman key type. */
|
||||
#define PSA_KEY_TYPE_GET_GROUP(type) \
|
||||
((psa_dh_group_t) (PSA_KEY_TYPE_IS_DH(type) ? \
|
||||
#define PSA_KEY_TYPE_DH_GET_FAMILY(type) \
|
||||
((psa_dh_family_t) (PSA_KEY_TYPE_IS_DH(type) ? \
|
||||
((type) & PSA_KEY_TYPE_DH_GROUP_MASK) : \
|
||||
0))
|
||||
|
||||
@ -574,7 +574,7 @@
|
||||
* 2048, 3072, 4096, 6144, 8192. A given implementation may support
|
||||
* all of these sizes or only a subset.
|
||||
*/
|
||||
#define PSA_DH_GROUP_RFC7919 ((psa_dh_group_t) 0x03)
|
||||
#define PSA_DH_FAMILY_RFC7919 ((psa_dh_family_t) 0x03)
|
||||
|
||||
#define PSA_GET_KEY_TYPE_BLOCK_SIZE_EXPONENT(type) \
|
||||
(((type) >> 8) & 7)
|
||||
|
Reference in New Issue
Block a user