15#ifndef ZEPHYR_INCLUDE_NET_COAP_OSCORE_H_
16#define ZEPHYR_INCLUDE_NET_COAP_OSCORE_H_
49 struct net_sockaddr_storage
addr;
65struct coap_oscore_context;
149 struct coap_oscore_context **ctx);
CoAP implementation for Zephyr.
int coap_oscore_context_init(struct coap_oscore_init_params *params, struct coap_oscore_context **ctx)
Initialize an OSCORE security context.
coap_oscore_hkdf
HKDF algorithm used to derive OSCORE keys (RFC 8613 Section 3.1).
Definition coap_oscore.h:74
coap_oscore_aead_alg
AEAD algorithm used to protect OSCORE messages (RFC 8613 Section 3.1).
Definition coap_oscore.h:68
void coap_oscore_context_free(struct coap_oscore_context *ctx)
Release an OSCORE security context.
@ COAP_OSCORE_HKDF_SHA_256
HKDF-SHA-256.
Definition coap_oscore.h:76
@ COAP_OSCORE_AEAD_AES_CCM_16_64_128
AES-CCM mode 128-bit key, 64-bit tag, 13-byte nonce.
Definition coap_oscore.h:70
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:48
net_socklen_t addr_len
Address length.
Definition coap_oscore.h:50
uint8_t tkl
Token length.
Definition coap_oscore.h:52
int64_t timestamp
Creation timestamp.
Definition coap_oscore.h:53
uint8_t token[COAP_TOKEN_MAX_LEN]
Token from the request.
Definition coap_oscore.h:51
struct net_sockaddr_storage addr
Client address.
Definition coap_oscore.h:49
OSCORE security context derivation parameters (RFC 8613 Section 3.2).
Definition coap_oscore.h:89
const uint8_t * id_context
ID Context (optional, set to NULL if unused).
Definition coap_oscore.h:111
size_t recipient_id_len
Length of recipient_id in bytes.
Definition coap_oscore.h:103
const uint8_t * master_salt
Master Salt (optional, set to NULL if unused).
Definition coap_oscore.h:106
size_t id_context_len
Length of id_context in bytes (0 if unused).
Definition coap_oscore.h:113
size_t sender_id_len
Length of sender_id in bytes.
Definition coap_oscore.h:98
enum coap_oscore_hkdf hkdf
KDF algorithm (use COAP_OSCORE_HKDF_SHA_256 for the default).
Definition coap_oscore.h:118
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:126
const uint8_t * recipient_id
Recipient ID (required).
Definition coap_oscore.h:101
size_t master_salt_len
Length of master_salt in bytes (0 if unused).
Definition coap_oscore.h:108
const uint8_t * master_secret
Master Secret (required, typically 16 bytes for AES-CCM-16-64-128).
Definition coap_oscore.h:91
size_t master_secret_len
Length of master_secret in bytes.
Definition coap_oscore.h:93
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:116
const uint8_t * sender_id
Sender ID (required).
Definition coap_oscore.h:96