TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
attest_core.c File Reference
#include <stdint.h>
#include <string.h>
#include <stddef.h>
#include "psa/client.h"
#include "attest.h"
#include "attest_key.h"
#include "tfm_boot_status.h"
#include "tfm_plat_defs.h"
#include "tfm_plat_device_id.h"
#include "tfm_plat_boot_seed.h"
#include "tfm_attest_hal.h"
#include "attest_token.h"
#include "attest_eat_defines.h"
#include "t_cose_common.h"
#include "tfm_memory_utils.h"
#include "tfm_plat_crypto_keys.h"
Include dependency graph for attest_core.c:

Go to the source code of this file.

Data Structures

struct  attest_boot_data
 Contains the received boot status information from bootloader. More...
 

Macros

#define MAX_BOOT_STATUS   512
 
#define EAT_SW_COMPONENT_NESTED   1 /* Nested map */
 
#define EAT_SW_COMPONENT_NOT_NESTED   0 /* Flat structure */
 
#define T_COSE_ALGORITHM   T_COSE_ALGORITHM_ES256
 

Functions

psa_status_t attest_init (void)
 Initialise the initial attestation service during the TF-M boot up process. More...
 
psa_status_t initial_attest_get_token (const psa_invec *in_vec, uint32_t num_invec, psa_outvec *out_vec, uint32_t num_outvec)
 Get initial attestation token. More...
 
psa_status_t initial_attest_get_token_size (const psa_invec *in_vec, uint32_t num_invec, psa_outvec *out_vec, uint32_t num_outvec)
 Get the size of the initial attestation token. More...
 
psa_status_t initial_attest_get_public_key (const psa_invec *in_vec, uint32_t num_invec, psa_outvec *out_vec, uint32_t num_outvec)
 Get the initial attestation public key. More...
 

Macro Definition Documentation

#define EAT_SW_COMPONENT_NESTED   1 /* Nested map */

Definition at line 28 of file attest_core.c.

#define EAT_SW_COMPONENT_NOT_NESTED   0 /* Flat structure */

Definition at line 29 of file attest_core.c.

#define MAX_BOOT_STATUS   512

Definition at line 25 of file attest_core.c.

#define T_COSE_ALGORITHM   T_COSE_ALGORITHM_ES256

Definition at line 35 of file attest_core.c.

Function Documentation

psa_status_t attest_init ( void  )

Initialise the initial attestation service during the TF-M boot up process.

Returns
Returns PSA_SUCCESS if init has been completed, otherwise error as specified in psa_status_t

Definition at line 99 of file attest_core.c.

Here is the call graph for this function:

Here is the caller graph for this function:

psa_status_t initial_attest_get_public_key ( const psa_invec in_vec,
uint32_t  num_invec,
psa_outvec out_vec,
uint32_t  num_outvec 
)

Get the initial attestation public key.

Parameters
[in]in_vecPointer to in_vec array, which contains input data to attestation service
[in]num_invecNumber of elements in in_vec array
[out]out_vecPointer to out_vec array, which contains pointer where to store the output data
[in]num_outvecNumber of elements in out_vec array
Returns
Returns error code as specified in psa_status_t

Definition at line 922 of file attest_core.c.

Here is the call graph for this function:

psa_status_t initial_attest_get_token ( const psa_invec in_vec,
uint32_t  num_invec,
psa_outvec out_vec,
uint32_t  num_outvec 
)

Get initial attestation token.

Parameters
[in]in_vecPointer to in_vec array, which contains input data to attestation service
[in]num_invecNumber of elements in in_vec array
[in,out]out_vecPointer out_vec array, which contains output data to attestation service
[in]num_outvecNumber of elements in out_vec array
Returns
Returns error code as specified in psa_status_t

Definition at line 833 of file attest_core.c.

psa_status_t initial_attest_get_token_size ( const psa_invec in_vec,
uint32_t  num_invec,
psa_outvec out_vec,
uint32_t  num_outvec 
)

Get the size of the initial attestation token.

Parameters
[in]in_vecPointer to in_vec array, which contains input data to attestation service
[in]num_invecNumber of elements in in_vec array
[out]out_vecPointer to out_vec array, which contains pointer where to store the output data
[in]num_outvecNumber of elements in out_vec array
Returns
Returns error code as specified in psa_status_t

Definition at line 869 of file attest_core.c.