nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
identity_key.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define IDENTITY_KEY_SIZE_BYTES   (32)
 Identity key size in bytes, corresponding to ECC secp256r1.
 
#define IDENTITY_KEY_ERR_MKEK_MISSING   (0x15501)
 Error value when MKEK is missing from the KMU.
 
#define IDENTITY_KEY_ERR_MISSING   (0x15502)
 Error value when identity key is missing from the KMU.
 
#define IDENTITY_KEY_ERR_READ_FAILED   (0x15503)
 Error value when identity key can't be read.
 
#define IDENTITY_KEY_ERR_WRITE_FAILED   (0x15504)
 Error value when identity key can't be written.
 
#define IDENTITY_KEY_ERR_GENERATION_FAILED   (0x15505)
 Error value when identity key generation failed.
 
#define IDENTITY_KEY_SUCCESS   (0x0)
 Return code for success.
 

Functions

bool identity_key_mkek_is_written (void)
 Function to check that the MKEK is present.
 
bool identity_key_is_written (void)
 Function to check if identity key is written.
 
int identity_key_read (uint8_t key[(32)])
 Function to read the identity key from KMU.
 
void identity_key_free (uint8_t key[(32)])
 Function to clear out an identity key after usage.
 
int identity_key_write_random (void)
 Function to write a random identity key to KMU.
 
int identity_key_write_key (uint8_t key[(32)])
 Function to write a previously generated identity key to the KMU.
 
int identity_key_write_dummy (void)
 Function to write a dummy identity key to KMU.