TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
attest_key.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __ATTEST_KEY_H__
9 #define __ATTEST_KEY_H__
10 
11 #include "attest.h"
13 #include "psa/crypto.h"
14 #include "q_useful_buf.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
32 
42 
57 
69 attest_get_instance_id(struct q_useful_buf_c *id_buf);
70 
85  size_t *public_key_len,
86  psa_ecc_family_t *public_key_curve);
87 
88 #ifdef INCLUDE_COSE_KEY_ID
89 
102 enum psa_attest_err_t
103 attest_get_initial_attestation_key_id(struct q_useful_buf_c *attest_key_id);
104 #else /* INCLUDE_COSE_KEY_ID */
105 static inline enum psa_attest_err_t
106 attest_get_initial_attestation_key_id(struct q_useful_buf_c *attest_key_id)
107 {
108  (void)attest_key_id;
109 
110  return PSA_ATTEST_ERR_SUCCESS;
111 }
112 #endif /* INCLUDE_COSE_KEY_ID */
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif /* __ATTEST_KEY_H__ */
enum psa_attest_err_t attest_get_initial_attestation_public_key(uint8_t **public_key, size_t *public_key_len, psa_ecc_family_t *public_key_curve)
Get the public key derived from the initial attestation private key.
Platform Security Architecture cryptography module.
psa_attest_err_t
Initial attestation service error types.
Definition: attest.h:25
enum psa_attest_err_t attest_get_instance_id(struct q_useful_buf_c *id_buf)
Get the buffer of Instance ID data.
enum psa_attest_err_t attest_register_initial_attestation_key()
Register the initial attestation private key to Crypto service. Loads the public key if the key has n...
_unsigned_integral_type_ psa_key_handle_t
Key handle.
Definition: crypto.h:35
enum psa_attest_err_t attest_get_signing_key_handle(psa_key_handle_t *key_handle)
Get the handle of the key for signing token In asymmetric key algorithm based initial attestation...
uint8_t psa_ecc_family_t
Definition: crypto_types.h:69
enum psa_attest_err_t attest_unregister_initial_attestation_key()
Unregister the initial attestation private key from Crypto service to do not occupy key slot...