TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
initial_attestation.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 /***************************************************************************/
9 /* DRAFT UNDER REVIEW */
10 /* These APIs are still evolving and are meant as a prototype for review.*/
11 /* The APIs will change depending on feedback and will be firmed up */
12 /* to a stable set of APIs once all the feedback has been considered. */
13 /***************************************************************************/
14 
15 #ifndef __PSA_INITIAL_ATTESTATION_H__
16 #define __PSA_INITIAL_ATTESTATION_H__
17 
18 #include <limits.h>
19 #include <stdint.h>
20 #include <stddef.h>
21 #include "psa/crypto.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
32 #define PSA_INITIAL_ATTEST_API_VERSION_MAJOR (1)
33 #define PSA_INITIAL_ATTEST_API_VERSION_MINOR (0)
34 
40 #define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_32 (32u)
41 #define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_48 (48u)
42 #define PSA_INITIAL_ATTEST_CHALLENGE_SIZE_64 (64u)
43 
49 #define PSA_INITIAL_ATTEST_MAX_TOKEN_SIZE (0x400)
50 
181 psa_initial_attest_get_token(const uint8_t *auth_challenge,
182  size_t challenge_size,
183  uint8_t *token_buf,
184  size_t token_buf_size,
185  size_t *token_size);
186 
201 psa_initial_attest_get_token_size(size_t challenge_size,
202  size_t *token_size);
203 
219 tfm_initial_attest_get_public_key(uint8_t *public_key,
220  size_t public_key_buf_size,
221  size_t *public_key_len,
222  psa_ecc_family_t *elliptic_curve_type);
223 
224 #ifdef __cplusplus
225 }
226 #endif
227 
228 #endif /* __PSA_INITIAL_ATTESTATION_H__ */
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_status_t psa_initial_attest_get_token_size(size_t challenge_size, size_t *token_size)
Get the exact size of initial attestation token in bytes.
psa_status_t psa_initial_attest_get_token(const uint8_t *auth_challenge, size_t challenge_size, uint8_t *token_buf, size_t token_buf_size, size_t *token_size)
Get initial attestation token.
uint8_t psa_ecc_family_t
Definition: crypto_types.h:69
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43