Package-level declarations
Types
Chooses the security context for an outgoing request. Null means no context: OscoreClient then fails the request with MessageSecurityException unless it was built with allowUnprotected, when null sends the request in plaintext (ADR 0008).
Keeps Sender Sequence Numbers in memory for the life of the process: the SequenceNumberStore for keys that are new in this process run and are never used after it ends, such as EDHOC output (RFC 9528 Appendix A.1), and for tests.
When a context must see a freshness proof before it trusts its replay window (RFC 8613 Appendix B.1.2).
A MutableSecurityContextRepository in memory, keyed by Recipient ID and ID Context. It keeps every context until it is removed, without a bound: right for provisioned contexts and tests, while a server that runs EDHOC for many clients supplies a bounded repository instead (MutableSecurityContextRepository).
A SecurityContextRepository that contexts are added to and removed from while the server runs: where kcoap-edhoc-oscore's EdhocServer puts the context of every EDHOC session it completes (RFC 9528 Appendix A.1), and where an application keeps the contexts it provisions or retires. InMemoryContextRepository is the implementation kcoap ships.
The OSCORE client side for the CoAP stack: protects requests with the context contexts picks and verifies the responses, including Observe notifications with their replay protection (RFC 8613 §4.1.3.5.2, §7.4.1).
Why an OSCORE message was rejected, with the error response RFC 8613 §8.2 and §7.4 suggest for a server. The diagnostic strings are the ones the RFC proposes.
Raised by OSCORE processing, a KcoapException with the error RFC 8613 §8.2 and §7.4 name; reading an OSCORE option (OscoreOptionValue.decode) throws it too. OscoreClient and OscoreServer convert it to the stack's MessageSecurityException (toMessageSecurityException) at the message-security SPI.
The peer behind an OSCORE request: its Sender ID (our Recipient ID) and the ID Context. The default SecurityContext.identity; a context EDHOC established carries kcoap-edhoc-oscore's EdhocIdentity, which holds this one and the peer's credential.
The value of the OSCORE option: the compressed COSE header (RFC 8613 §6.1).
The OSCORE server side for the CoAP stack: verifies requests carrying the OSCORE option against the contexts in contexts and protects the responses. Each verified request carries its context's SecurityContext.identity. Requests without the option are left to the stack (null). On a server with message security its default access policy refuses them, so only the resources the application makes AccessPolicy.Public (kcoap-coap's server) serve them (ADR 0008).
A derived OSCORE security context (RFC 8613 §3): the Common Context (keys' common inputs and Common IV), the Sender Context (Sender Key and Sequence Number) and the Recipient Context (Recipient Key and Replay Window).
The input parameters of an OSCORE security context (RFC 8613 §3.2), as agreed out of band or derived by EDHOC. SecurityContext.derive turns them into keys.
Finds the Recipient Context for an incoming request by its 'kid' and optional 'kid context' (RFC 8613 §8.2 step 2). Implementations may derive a context on demand, as Appendix B.2 and EDHOC do.
Persists Sender Sequence Numbers across restarts (RFC 8613 Appendix B.1.1), so a restarted endpoint never reuses an AEAD nonce under the same Sender Key.