19 #define ECC_CURVE_SECP256R1_PUBLIC_KEY_LENGTH (1 + 2 * PSA_BITS_TO_BYTES(256))
36 static uint32_t public_key_registered = 0;
44 size_t public_key_len;
48 if (public_key_registered != 0) {
53 sizeof(public_key_buff),
67 (
const uint8_t *)&public_key_buff,
75 public_key_registered = 1;
85 if (public_key_registered != 1) {
93 public_key_registered = 0;
psa_status_t tfm_initial_attest_get_public_key(uint8_t *public_key, size_t public_key_buf_size, size_t *public_key_len, psa_ecc_family_t *elliptic_curve_type)
Get the initial attestation public key.
Platform Security Architecture cryptography module.
psa_attest_err_t
Initial attestation service error types.
#define ECC_CURVE_SECP256R1_PUBLIC_KEY_LENGTH
Calculates the size of ECC public key in bytes based on the bit size of the curve.
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve)
#define PSA_KEY_USAGE_VERIFY
#define PSA_ALG_ECDSA(hash_alg)
enum psa_attest_err_t attest_register_initial_attestation_public_key(psa_key_handle_t *public_key)
Register the initial attestation public key to Crypto service to verify the signature of the token...
enum psa_attest_err_t attest_unregister_initial_attestation_public_key(psa_key_handle_t public_key)
Unregister the initial attestation public key from Crypto service to do not occupy key slot...
int32_t psa_status_t
Function return status.