O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Securing CoAP communication

HTTP is secured using Transport Layer Security (TLS), as presented in previous chapters. But TLS requires an underlying stream of data such as that provided by TCP connections. Since the order of UDP datagrams is not preserved, TLS cannot be used with UDP directly. For this purpose, Datagram Transport Layer Security (DTLS), was developed. DTLS is a modification of TLS; it can be used by protocols such as UDP that lose, and possibly reorder, datagrams.

CoAP normally uses port 5684 for DTLS encrypted communication.

Since DTLS is often used in resource-constrained environment, DTLS implementations are also significantly more lightweight than traditional TLS implementations. At least, if not a large security library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required