TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
attest_key.h File Reference
#include "attest.h"
#include "psa/initial_attestation.h"
#include "psa/crypto.h"
#include "q_useful_buf.h"
Include dependency graph for attest_key.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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 not already been loaded. More...
 
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. More...
 
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, it is the handle of the initial attestation private key. In symmetric key algorithm based initial attestation, it is the handle of symmetric initial attestation key. More...
 
enum psa_attest_err_t attest_get_instance_id (struct q_useful_buf_c *id_buf)
 Get the buffer of Instance ID data. More...
 
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. More...
 

Function Documentation

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.

Parameters
[out]public_keyPointer to public key buffer.
[out]public_key_lenSize of public key in bytes.
[out]public_key_curveType of the curve that is used in the public key.
Return values
PSA_ATTEST_ERR_SUCCESSPublic key was successfully returned.
PSA_ATTEST_ERR_GENERALPublic key could not be returned.

Definition at line 148 of file attest_asymmetric_key.c.

Here is the caller graph for this function:

enum psa_attest_err_t attest_get_instance_id ( struct q_useful_buf_c *  id_buf)

Get the buffer of Instance ID data.

Parameters
[out]id_bufAddress and length of Instance ID buffer
Return values
PSA_ATTEST_ERR_SUCCESSInstance ID was successfully returned.
PSA_ATTEST_ERR_CLAIM_UNAVAILABLEInstance ID is unavailable
PSA_ATTEST_ERR_GENERALInstance ID could not be returned.

Definition at line 212 of file attest_asymmetric_key.c.

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, it is the handle of the initial attestation private key. In symmetric key algorithm based initial attestation, it is the handle of symmetric initial attestation key.

Parameters
[out]key_handleThe handle of the key for signing token.
Return values
PSA_ATTEST_ERR_SUCCESSKey handle was successfully returned.
PSA_ATTEST_ERR_GENERALKey handle could not be returned.

Definition at line 136 of file attest_asymmetric_key.c.

Here is the caller graph for this function:

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 not already been loaded.

Note
Private key MUST be present on the device, otherwise initial attestation token cannot be signed.
Return values
PSA_ATTEST_ERR_SUCCESSKey(s) was registered.
PSA_ATTEST_ERR_GENERALKey(s) could not be registered.

Definition at line 60 of file attest_asymmetric_key.c.

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.

Return values
PSA_ATTEST_ERR_SUCCESSKey(s) was unregistered.
PSA_ATTEST_ERR_GENERALKey(s) could not be unregistered.

Definition at line 117 of file attest_asymmetric_key.c.