Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
keys.h
Go to the documentation of this file.
1
9
10#ifndef INFUSE_SDK_INCLUDE_INFUSE_EPACKET_KEYS_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_EPACKET_KEYS_H_
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#include <stdint.h>
18
19#include <zephyr/sys/util.h>
20
21#include <psa/crypto.h>
22
29
39
57
74int epacket_key_derive(psa_key_id_t base_key, const uint8_t *info, uint8_t info_len, uint32_t salt,
75 psa_key_id_t *output_key_id);
76
87psa_key_id_t epacket_key_id_get(uint8_t key_type, uint32_t key_identifier, uint32_t key_rotation);
88
96int epacket_key_delete(psa_key_id_t key_id);
97
98#ifdef CONFIG_INFUSE_SECURITY_CHACHA_KEY_EXPORT
99
109int epacket_key_export(psa_key_id_t key_id, uint8_t key[32]);
110
111#endif /* CONFIG_INFUSE_SECURITY_CHACHA_KEY_EXPORT */
112
124int epacket_key_extension_network_add(psa_key_id_t key_id, uint32_t network_id);
125
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif /* INFUSE_SDK_INCLUDE_INFUSE_EPACKET_KEYS_H_ */
int epacket_key_extension_network_add(psa_key_id_t key_id, uint32_t network_id)
Add another network to the key module.
int epacket_key_derive(psa_key_id_t base_key, const uint8_t *info, uint8_t info_len, uint32_t salt, psa_key_id_t *output_key_id)
HKDF-SHA256 based key derivation.
int epacket_key_delete(psa_key_id_t key_id)
Delete a PSA key ID.
epacket_key_type
ePacket key types
Definition keys.h:33
psa_key_id_t epacket_key_id_get(uint8_t key_type, uint32_t key_identifier, uint32_t key_rotation)
Get PSA key ID from ePacket key ID.
epacket_key_interface
ePacket key interfaces
Definition keys.h:43
@ EPACKET_KEY_DEVICE
Device key.
Definition keys.h:37
@ EPACKET_KEY_NETWORK
Network key.
Definition keys.h:35
@ EPACKET_KEY_INTERFACE_NUM
Number of key interfaces.
Definition keys.h:53
@ EPACKET_KEY_INTERFACE_MASK
Mask of the interface bits in a key type.
Definition keys.h:55
@ EPACKET_KEY_INTERFACE_BT_ADV
Key for the Bluetooth advertising interface.
Definition keys.h:49
@ EPACKET_KEY_INTERFACE_UDP
Key for the UDP interface.
Definition keys.h:47
@ EPACKET_KEY_INTERFACE_SERIAL
Key for the serial interface.
Definition keys.h:45
@ EPACKET_KEY_INTERFACE_BT_GATT
Key for the Bluetooth GATT interfaces.
Definition keys.h:51