#include "attest_key.h"
#include <stdint.h>
#include <stddef.h>
#include "tfm_plat_defs.h"
#include "tfm_plat_crypto_keys.h"
#include "tfm_plat_device_id.h"
#include "t_cose_standard_constants.h"
#include "q_useful_buf.h"
#include "qcbor.h"
#include "tfm_memory_utils.h"
Go to the source code of this file.
#define ATTEST_KEY_HANDLE_NOT_LOADED 0 |
Get the public key derived from the initial attestation private key.
- Parameters
-
[out] | public_key | Pointer to public key buffer. |
[out] | public_key_len | Size of public key in bytes. |
[out] | public_key_curve | Type of the curve that is used in the public key. |
- Return values
-
PSA_ATTEST_ERR_SUCCESS | Public key was successfully returned. |
PSA_ATTEST_ERR_GENERAL | Public key could not be returned. |
Definition at line 148 of file attest_asymmetric_key.c.
Get the buffer of Instance ID data.
- Parameters
-
[out] | id_buf | Address and length of Instance ID buffer |
- Return values
-
PSA_ATTEST_ERR_SUCCESS | Instance ID was successfully returned. |
PSA_ATTEST_ERR_CLAIM_UNAVAILABLE | Instance ID is unavailable |
PSA_ATTEST_ERR_GENERAL | Instance ID could not be returned. |
Definition at line 212 of file attest_asymmetric_key.c.
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_handle | The handle of the key for signing token. |
- Return values
-
PSA_ATTEST_ERR_SUCCESS | Key handle was successfully returned. |
PSA_ATTEST_ERR_GENERAL | Key handle could not be returned. |
Definition at line 136 of file attest_asymmetric_key.c.
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_SUCCESS | Key(s) was registered. |
PSA_ATTEST_ERR_GENERAL | Key(s) could not be registered. |
Definition at line 60 of file attest_asymmetric_key.c.
Unregister the initial attestation private key from Crypto service to do not occupy key slot.
- Return values
-
PSA_ATTEST_ERR_SUCCESS | Key(s) was unregistered. |
PSA_ATTEST_ERR_GENERAL | Key(s) could not be unregistered. |
Definition at line 117 of file attest_asymmetric_key.c.