← Back to the chapter · Next detail →
Technical detail · CoAP DTLS/OSCORE Security
OSCORE encryption, options and sequence state
OSCORE protects CoAP message content using a security context shared by its content endpoints. Those endpoints need both keys and associated state to protect and verify messages safely through a forwarding gateway.
OSCORE uses COSE, the CBOR Object Signing and Encryption framework. CBOR is a compact binary representation. Authenticated encryption with associated data (AEAD) encrypts content and checks integrity, including associated data covered by the protection. The OSCORE option marks processing of protected content within an outer CoAP message, whose forwarding fields remain available to intermediaries. Do not assume every option is encrypted or every visible field is unprotected. Check the options’ actual handling for proxy routing and caching.
Sender sequence state contributes to the nonce, a value used by authenticated encryption that must not be reused with the same key. The recipient’s replay window identifies duplicate protected requests while allowing the configured range of reordered requests. Losing this state can undermine safe recovery. A message can also be old without being a duplicate; application age checks remain separate.