From 46e6f9de4a80f440da4138d4ef642e1ca0e3938f Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 4 Dec 2019 17:24:43 +0100 Subject: [PATCH] Document the vendor range for EC curve and DH group families --- include/psa/crypto_types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/psa/crypto_types.h b/include/psa/crypto_types.h index ca48d60dc..d96c66e5c 100644 --- a/include/psa/crypto_types.h +++ b/include/psa/crypto_types.h @@ -70,6 +70,9 @@ typedef uint16_t psa_key_type_t; * 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. + * + * Values defined by this standard will never be in the range 0x80-0xff. + * Vendors who define additional families must use an encoding in this range. */ typedef uint8_t psa_ecc_curve_t; @@ -78,6 +81,9 @@ typedef uint8_t psa_ecc_curve_t; * 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. + * + * Values defined by this standard will never be in the range 0x80-0xff. + * Vendors who define additional families must use an encoding in this range. */ typedef uint8_t psa_dh_group_t;