All modules:

Link copied to clipboard

CBOR (RFC 8949) for the protocols in kcoap: a small value model (CborValue), a streaming CborWriter that always produces preferred, definite-length encodings, and a CborReader for structures and CBOR sequences (RFC 8742) such as EDHOC messages.

Link copied to clipboard

The CoAP endpoint stack, with client and server APIs for CoAP over UDP and over reliable transports (TCP, WebSockets; RFC 8323). Common Kotlin, no I/O of its own: transports plug in through kcoap-transport.

Link copied to clipboard

CoAP's wire vocabulary: the message model, options, URIs and link format, the codecs for every CoAP framing, and the message-security SPI that OSCORE implements. Common Kotlin with no I/O, no coroutines and no state of its own; it depends only on kcoap-common and kcoap-transport (for Endpoint and CoapScheme).

Link copied to clipboard

The base every kcoap module builds on: logging, the root of kcoap's exceptions, byte helpers for secrets, and the two opt-in markers. It has no dependencies, not even kotlinx-coroutines, and is common Kotlin only, so it builds for every target. kcoap-transport, kcoap-cbor and kcoap-crypto export it (api), so an application reaches it through any kcoap module and rarely names it.

Link copied to clipboard

The COSE (RFC 9052 / 9053) pieces OSCORE and EDHOC need. Neither protocol sends complete COSE messages, so this module provides the structures they authenticate and the key formats they carry:

Link copied to clipboard

The seam between kcoap's protocols and cryptography, and the building blocks they share. Protocol code (OSCORE, EDHOC, COSE, DTLS) never calls a platform API: it calls a CryptoBackend, and what every backend would otherwise implement again is common code here. Pure Kotlin with no platform dependencies, so it builds for every target, browsers included; the backends live in kcoap-crypto-default (the platform's cryptography) and kcoap-crypto-bc (post-quantum on Bouncy Castle).

Link copied to clipboard

Post-quantum CryptoBackend for the JVM and Android: ML-KEM (FIPS 203) and ML-DSA (FIPS 204) on Bouncy Castle's lightweight API (bcprov-jdk18on), for the EDHOC PQ cipher suites of draft-ietf-lake-pqsuites. libedhoc's private suite -24 uses ML-KEM-512 for the ephemeral key exchange and ML-DSA-44 for signatures.

Link copied to clipboard

The default CryptoBackend, on cryptography-kotlin 0.6: one common-code implementation over whatever provider the platform has.

Link copied to clipboard

The conformance suite of kcoap's crypto seam: abstract tests that a CryptoBackend's own tests extend, so every backend, kcoap's or yours (a key store, an HSM, a secure element, a post-quantum implementation), is held to the same contract on every platform it runs on. It is a test library: depend on it from test source sets only.

Link copied to clipboard

EDHOC (RFC 9528), the lightweight authenticated key exchange for OSCORE, as sans-IO state machines for both roles. The state machines take and return message bytes; transport, message correlation and deduplication (RFC 9528 §3.4, §7) belong to the caller, and EDHOC over CoAP (Appendix A.2, RFC 9668) to kcoap-edhoc-oscore.

Link copied to clipboard

EDHOC as the key establishment for OSCORE, over CoAP:

Link copied to clipboard

Object Security for Constrained RESTful Environments (RFC 8613): end-to-end protection of CoAP requests and responses that survives proxies and transport changes.

Link copied to clipboard

An in-memory datagram network and in-memory connections for tests: of kcoap itself, and of applications built on it.

Link copied to clipboard

The seam between protocol code and the network. Its only dependency is kcoap-common, for the opt-in markers, which every module above it reaches through this one; no third-party library.

Link copied to clipboard

Network transports on ktor-network for the targets that have sockets (the SOCKETS tier): JVM (and so Android), Apple and Linux; not the web. Browsers have no UDP or TCP; they use kcoap-transport-ktor-websocket and reach devices through a proxy (see docs/architecture.md). A TLS client for coaps+tcp is on the JVM only, where ktor-network-tls has one.

Link copied to clipboard

The WebSocket client transport for coap+ws and coaps+ws (RFC 8323 §4) on the ktor client. It builds for every kcoap target (the UNIVERSAL tier), browsers and Node.js included, and is common code except for one line per platform that names the default client's engine. WebSockets are the one transport a browser allows, so this is how a browser reaches CoAP.

Link copied to clipboard

The WebSocket server transport for coap+ws (RFC 8323 §4) on the ktor server, in common code, and for coaps+ws where the application's ktor engine runs the TLS; kcoap has no TLS server of its own (../docs/adr/0010-server-side-tls.md). It runs on the JVM and the native targets (the SOCKETS tier): a browser cannot accept connections, and reaches a CoAP server as a client through kcoap-transport-ktor-websocket.