All modules:
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.
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.
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).
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.
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:
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).
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.
The default CryptoBackend, on cryptography-kotlin 0.6: one common-code implementation over whatever provider the platform has.
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.
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.
EDHOC as the key establishment for OSCORE, over CoAP:
Object Security for Constrained RESTful Environments (RFC 8613): end-to-end protection of CoAP requests and responses that survives proxies and transport changes.
An in-memory datagram network and in-memory connections for tests: of kcoap itself, and of applications built on it.
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.
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.
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.
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.