mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 21:50:59 +00:00
Xref documentation for ECC curves and DH groups.
Connect the types to the key type construction macros by x-refs.
This commit is contained in:
parent
fd368e50d5
commit
214064ea85
|
@ -66,6 +66,10 @@ typedef int32_t psa_status_t;
|
||||||
typedef uint32_t psa_key_type_t;
|
typedef uint32_t psa_key_type_t;
|
||||||
|
|
||||||
/** The type of PSA elliptic curve identifiers.
|
/** The type of PSA elliptic curve identifiers.
|
||||||
|
*
|
||||||
|
* The curve identifier is required to create an ECC key using the
|
||||||
|
* PSA_KEY_TYPE_ECC_KEY_PAIR() or PSA_KEY_TYPE_ECC_PUBLIC_KEY()
|
||||||
|
* macros.
|
||||||
*
|
*
|
||||||
* The encoding of curve identifiers is taken from the
|
* The encoding of curve identifiers is taken from the
|
||||||
* TLS Supported Groups Registry (formerly known as the
|
* TLS Supported Groups Registry (formerly known as the
|
||||||
|
@ -89,6 +93,10 @@ typedef uint32_t psa_key_type_t;
|
||||||
typedef uint16_t psa_ecc_curve_t;
|
typedef uint16_t psa_ecc_curve_t;
|
||||||
|
|
||||||
/** The type of PSA Diffie-Hellman group identifiers.
|
/** The type of PSA Diffie-Hellman group identifiers.
|
||||||
|
*
|
||||||
|
* The group identifier is required to create an Diffie-Hellman key using the
|
||||||
|
* PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY()
|
||||||
|
* macros.
|
||||||
*
|
*
|
||||||
* The encoding of group identifiers is taken from the
|
* The encoding of group identifiers is taken from the
|
||||||
* TLS Supported Groups Registry (formerly known as the
|
* TLS Supported Groups Registry (formerly known as the
|
||||||
|
|
|
@ -421,10 +421,18 @@
|
||||||
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE ((psa_key_type_t)0x60030000)
|
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE ((psa_key_type_t)0x60030000)
|
||||||
#define PSA_KEY_TYPE_ECC_KEY_PAIR_BASE ((psa_key_type_t)0x70030000)
|
#define PSA_KEY_TYPE_ECC_KEY_PAIR_BASE ((psa_key_type_t)0x70030000)
|
||||||
#define PSA_KEY_TYPE_ECC_CURVE_MASK ((psa_key_type_t)0x0000ffff)
|
#define PSA_KEY_TYPE_ECC_CURVE_MASK ((psa_key_type_t)0x0000ffff)
|
||||||
/** Elliptic curve key pair. */
|
/** Elliptic curve key pair.
|
||||||
|
*
|
||||||
|
* \param curve A value of type ::psa_ecc_curve_t that identifies the
|
||||||
|
* ECC curve to be used.
|
||||||
|
*/
|
||||||
#define PSA_KEY_TYPE_ECC_KEY_PAIR(curve) \
|
#define PSA_KEY_TYPE_ECC_KEY_PAIR(curve) \
|
||||||
(PSA_KEY_TYPE_ECC_KEY_PAIR_BASE | (curve))
|
(PSA_KEY_TYPE_ECC_KEY_PAIR_BASE | (curve))
|
||||||
/** Elliptic curve public key. */
|
/** Elliptic curve public key.
|
||||||
|
*
|
||||||
|
* \param curve A value of type ::psa_ecc_curve_t that identifies the
|
||||||
|
* ECC curve to be used.
|
||||||
|
*/
|
||||||
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve) \
|
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve) \
|
||||||
(PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve))
|
(PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve))
|
||||||
|
|
||||||
|
@ -511,10 +519,18 @@
|
||||||
#define PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE ((psa_key_type_t)0x60040000)
|
#define PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE ((psa_key_type_t)0x60040000)
|
||||||
#define PSA_KEY_TYPE_DH_KEY_PAIR_BASE ((psa_key_type_t)0x70040000)
|
#define PSA_KEY_TYPE_DH_KEY_PAIR_BASE ((psa_key_type_t)0x70040000)
|
||||||
#define PSA_KEY_TYPE_DH_GROUP_MASK ((psa_key_type_t)0x0000ffff)
|
#define PSA_KEY_TYPE_DH_GROUP_MASK ((psa_key_type_t)0x0000ffff)
|
||||||
/** Diffie-Hellman key pair. */
|
/** Diffie-Hellman key pair.
|
||||||
|
*
|
||||||
|
* \param group A value of type ::psa_dh_group_t that identifies the
|
||||||
|
* Diffie-Hellman group to be used.
|
||||||
|
*/
|
||||||
#define PSA_KEY_TYPE_DH_KEY_PAIR(group) \
|
#define PSA_KEY_TYPE_DH_KEY_PAIR(group) \
|
||||||
(PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group))
|
(PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group))
|
||||||
/** Diffie-Hellman public key. */
|
/** Diffie-Hellman public key.
|
||||||
|
*
|
||||||
|
* \param group A value of type ::psa_dh_group_t that identifies the
|
||||||
|
* Diffie-Hellman group to be used.
|
||||||
|
*/
|
||||||
#define PSA_KEY_TYPE_DH_PUBLIC_KEY(group) \
|
#define PSA_KEY_TYPE_DH_PUBLIC_KEY(group) \
|
||||||
(PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE | (group))
|
(PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE | (group))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue