|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
CoAP OSCORE API. More...
Data Structures | |
| struct | coap_oscore_exchange |
| OSCORE exchange entry. More... | |
| struct | coap_oscore_init_params |
| OSCORE security context derivation parameters (RFC 8613 Section 3.2). More... | |
Enumerations | |
| enum | coap_oscore_aead_alg { COAP_OSCORE_AEAD_AES_CCM_16_64_128 = 0 } |
| AEAD algorithm used to protect OSCORE messages (RFC 8613 Section 3.1). More... | |
| enum | coap_oscore_hkdf { COAP_OSCORE_HKDF_SHA_256 = 0 } |
| HKDF algorithm used to derive OSCORE keys (RFC 8613 Section 3.1). More... | |
Functions | |
| int | coap_oscore_context_init (struct coap_oscore_init_params *params, struct coap_oscore_context **ctx) |
| Initialize an OSCORE security context. | |
| void | coap_oscore_context_free (struct coap_oscore_context *ctx) |
| Release an OSCORE security context. | |
CoAP OSCORE API.
| enum coap_oscore_aead_alg |
#include <coap_oscore.h>
AEAD algorithm used to protect OSCORE messages (RFC 8613 Section 3.1).
| Enumerator | |
|---|---|
| COAP_OSCORE_AEAD_AES_CCM_16_64_128 | AES-CCM mode 128-bit key, 64-bit tag, 13-byte nonce. |
| enum coap_oscore_hkdf |
#include <coap_oscore.h>
HKDF algorithm used to derive OSCORE keys (RFC 8613 Section 3.1).
| Enumerator | |
|---|---|
| COAP_OSCORE_HKDF_SHA_256 | HKDF-SHA-256. |
| void coap_oscore_context_free | ( | struct coap_oscore_context * | ctx | ) |
#include <coap_oscore.h>
Release an OSCORE security context.
Returns the context to the pool. The caller must ensure the context is no longer attached to any CoAP client or service before freeing it. Passing NULL is a no-op.
CONFIG_COAP_OSCORE.
| ctx | Context previously returned by coap_oscore_context_init(). |
| int coap_oscore_context_init | ( | struct coap_oscore_init_params * | params, |
| struct coap_oscore_context ** | ctx ) |
#include <coap_oscore.h>
Initialize an OSCORE security context.
Derives the common, sender and recipient contexts from params (RFC 8613 Section 3.2) and returns an opaque handle that can be attached to a CoAP client or service. Contexts are allocated from a fixed pool sized by
CONFIG_COAP_OSCORE_MAX_CONTEXTS
and released with coap_oscore_context_free().
CONFIG_COAP_OSCORE.
| params | Derivation parameters. |
| ctx | On success, set to the newly created context handle. |
| 0 | on success. |
| -EINVAL | if params or ctx is NULL, or a required parameter is missing, or the context could not be derived. |
| -ENOMEM | if no free context slot is available. |