Platform: Use PSA ECC ID for attestation key
Change from using a COSE curve ID to a PSA curve ID to simplify the
loading of keys into the crypto service.
Change-Id: Id67816810107ecd2e5f5be768363091dda7a9615
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/platform/include/tfm_plat_crypto_keys.h b/platform/include/tfm_plat_crypto_keys.h
index 59b438b..81c54a7 100644
--- a/platform/include/tfm_plat_crypto_keys.h
+++ b/platform/include/tfm_plat_crypto_keys.h
@@ -14,6 +14,7 @@
#include <stdint.h>
#include "tfm_plat_defs.h"
+#include "psa/crypto.h"
#ifdef __cplusplus
extern "C" {
@@ -23,7 +24,7 @@
* Elliptic curve key type identifiers according to RFC8152 (COSE encoding)
* https://www.iana.org/assignments/cose/cose.xhtml#elliptic-curves
*/
-enum ecc_curve_t {
+enum cose_ecc_curve_t {
P_256 = 1, /* NIST P-256 also known as secp256r1 */
P_384 = 2, /* NIST P-384 also known as secp384r1 */
P_521 = 3, /* NIST P-521 also known as secp521r1 */
@@ -110,7 +111,7 @@
* about the initial attestation key, which is
* stored in key_buf.
* \param[out] curve_type The type of the EC curve, which the key belongs
- * to according to \ref ecc_curve_t
+ * to according to \ref psa_ecc_curve_t
*
* \return Returns error code specified in \ref tfm_plat_err_t
*/
@@ -118,7 +119,7 @@
tfm_plat_get_initial_attest_key(uint8_t *key_buf,
uint32_t size,
struct ecc_key_t *ecc_key,
- enum ecc_curve_t *curve_type);
+ psa_ecc_curve_t *curve_type);
/**
* \brief Get the hash of the corresponding Root of Trust Public Key for