nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches
identity_key.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef IDENTITY_KEY_H_
8#define IDENTITY_KEY_H_
9
10#include <stdint.h>
11#include <stdbool.h>
12
21#ifdef __cplusplus
22extern "C" {
23#endif
24
26#define IDENTITY_KEY_SIZE_BYTES (32)
27
29#define IDENTITY_KEY_ERR_MKEK_MISSING (0x15501)
30
32#define IDENTITY_KEY_ERR_MISSING (0x15502)
33
35#define IDENTITY_KEY_ERR_READ_FAILED (0x15503)
36
38#define IDENTITY_KEY_ERR_WRITE_FAILED (0x15504)
39
41#define IDENTITY_KEY_ERR_GENERATION_FAILED (0x15505)
42
44#define IDENTITY_KEY_SUCCESS (0x0)
45
54
61
73
83
95
110
122
123#ifdef __cplusplus
124}
125#endif
126
131#endif /* IDENTITY_KEY_H_ */
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_write_dummy(void)
Function to write a dummy identity key to KMU.
void identity_key_free(uint8_t key[(32)])
Function to clear out an identity key after usage.
int identity_key_read(uint8_t key[(32)])
Function to read the identity key from KMU.
int identity_key_write_random(void)
Function to write a random identity key to KMU.
#define IDENTITY_KEY_SIZE_BYTES
Identity key size in bytes, corresponding to ECC secp256r1.
Definition identity_key.h:26
int identity_key_write_key(uint8_t key[(32)])
Function to write a previously generated identity key to the KMU.