Communication Security

Contiki-NG comes with standard communication protocols, that provide both per-hop and end-to-end confidentiality and integrity.

Application-layer security

Application-layer security is end-to-end, over IPv6 in the Contiki-NG case. We currently support DTLS using the Mbed TLS implementation. On top of DTLS, we support CoAPs doc:coaps, which is the secure version of CoAP. With CoAPs, the CoAP header and payload is encrypted and authenticated end-to-end, that is, from IP host to IP host. This offers some level of protection against malicious routers (can not read nor tamper the data). Both pre-shared keys and certificates are supported, selected at build time with MAKE_COAP_DTLS_WITH_PSK and MAKE_COAP_DTLS_WITH_CERT; the LWM2M tutorial shows both configurations.

Key agreement with EDHOC

For establishing secure communication between IoT devices, Contiki-NG supports EDHOC (Ephemeral Diffie-Hellman Over COSE) as specified in RFC 9528. EDHOC is a lightweight authenticated key exchange protocol optimized for constrained devices. It provides mutual authentication, perfect forward secrecy, and identity protection. See doc:edhoc for detailed documentation.