15#ifndef ZEPHYR_INCLUDE_NET_COAP_OSCORE_H_
16#define ZEPHYR_INCLUDE_NET_COAP_OSCORE_H_
46struct coap_oscore_context;
132 struct coap_oscore_context **ctx);
164 struct net_sockaddr_storage
addr;
169 struct coap_oscore_context *
ctx;
CoAP implementation for Zephyr.
int coap_oscore_context_add(const struct coap_oscore_init_params *params, struct coap_oscore_context **ctx)
Add an OSCORE security context.
coap_oscore_hkdf
HKDF algorithm used to derive OSCORE keys (RFC 8613 Section 3.1).
Definition coap_oscore.h:55
int coap_oscore_context_remove(struct coap_oscore_context *ctx)
Remove an OSCORE security context.
coap_oscore_aead_alg
AEAD algorithm used to protect OSCORE messages (RFC 8613 Section 3.1).
Definition coap_oscore.h:49
@ COAP_OSCORE_HKDF_SHA_256
HKDF-SHA-256.
Definition coap_oscore.h:57
@ COAP_OSCORE_AEAD_AES_CCM_16_64_128
AES-CCM mode 128-bit key, 64-bit tag, 13-byte nonce.
Definition coap_oscore.h:51
uint32_t net_socklen_t
Length of a socket address.
Definition net_ip.h:172
IPv6 and IPv4 definitions.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__INT64_TYPE__ int64_t
Definition stdint.h:75
OSCORE exchange entry.
Definition coap_oscore.h:163
net_socklen_t addr_len
Address length.
Definition coap_oscore.h:165
uint8_t tkl
Token length.
Definition coap_oscore.h:167
struct coap_oscore_context * ctx
OSCORE context used for this exchange.
Definition coap_oscore.h:169
int64_t timestamp
Creation timestamp.
Definition coap_oscore.h:168
uint8_t token[COAP_TOKEN_MAX_LEN]
Token from the request.
Definition coap_oscore.h:166
struct net_sockaddr_storage addr
Client address.
Definition coap_oscore.h:164
OSCORE security context derivation parameters (RFC 8613 Section 3.2).
Definition coap_oscore.h:69
const uint8_t * id_context
ID Context (optional, set to NULL if unused).
Definition coap_oscore.h:91
size_t recipient_id_len
Length of recipient_id in bytes.
Definition coap_oscore.h:83
const uint8_t * master_salt
Master Salt (optional, set to NULL if unused).
Definition coap_oscore.h:86
size_t id_context_len
Length of id_context in bytes (0 if unused).
Definition coap_oscore.h:93
size_t sender_id_len
Length of sender_id in bytes.
Definition coap_oscore.h:78
enum coap_oscore_hkdf hkdf
KDF algorithm (use COAP_OSCORE_HKDF_SHA_256 for the default).
Definition coap_oscore.h:98
bool fresh_master_secret_salt
True if the combination of Master Secret and Master Salt is unique at every boot (e....
Definition coap_oscore.h:106
const uint8_t * recipient_id
Recipient ID (required).
Definition coap_oscore.h:81
size_t master_salt_len
Length of master_salt in bytes (0 if unused).
Definition coap_oscore.h:88
const uint8_t * master_secret
Master Secret (required, typically 16 bytes for AES-CCM-16-64-128).
Definition coap_oscore.h:71
size_t master_secret_len
Length of master_secret in bytes.
Definition coap_oscore.h:73
enum coap_oscore_aead_alg aead_alg
AEAD algorithm (use COAP_OSCORE_AEAD_AES_CCM_16_64_128 for the default).
Definition coap_oscore.h:96
const uint8_t * sender_id
Sender ID (required).
Definition coap_oscore.h:76