Repository navigation
Implement DTSL (encrypted UDP sockets) #5270
Description
Activity
I don't believe it's implemented. A while back, I took a look at doing so, and despite what I said in that thread, I did indeed abandon it.
IIRC, the underlying stack (mbedtls) supports this.
@dpgeorge Any plans to implement DTLS?
Thank you.
Any plans to implement DTLS?
Not in the short term, but in the medium term (~3 months) it could be done if there's enough interest.
Reacted by beyonlo, Harshad Sharma, Andre Lucio and SebastianFor reference, using DTLS on CPython is possible via https://github.com/rbit/pydtls
- changed the title
[-]DTSL example - missing on the docs.[/-][+]Implement DTSL (encrypted UDP sockets)[/+]on Oct 30, 2019 - addedenhancementFeature requests, new feature implementationsFeature requests, new feature implementations
on Oct 30, 2019 I am also interested in DTLS support, however I would prefer it to be done similarly to ucryptolib.aes with encrypt/decrypt methods. The reason is that the output would be used as UDP payload for NB-IoT modem controlled via AT commands which is not bound to lwip.
Reacted by roland, beyonlo and Fernando van LoenhoutThe reason is that the output would be used as UDP payload for NB-IoT modem controlled via AT commands which is not bound to lwip.
Note that the
sslmodule can currently be used stand-alone, ie without lwip/sockets. It just requires a suitable stream (eg user class derived fromio.IOBase) to be passed in tossl.wrap_socketI would envisage a similar thing for DTLS.Reacted by dmartauzAny plans to implement DTLS?
Not in the short term, but in the medium term (~3 months) it could be done if there's enough interest.
I'm interested as well, I'm searching for an option to encrypt/decrypt UDP packets on an ESP32.
The possibility to communicate securely definitely makes sense, also in the IoT/embedded world :)
- added a commit that references this issue
on Feb 14, 2025 DTLS is now supported, see commit 321b30c
Reacted by dmartauz and beyonlo- added a commit that references this issue
on Mar 31, 2025 - added a commit that references this issue
on May 29, 2025 - added a commit that references this issue
on Jun 2, 2025 - added a commit that references this issue
on Sep 21, 2026
Hello.
Are there any example about to use DTLS? I would like to use UDP protocol to communicate, but in the secure mode, like as a TCP socket using TLS. I found on docs just about ussl for TCP sockets.
Thank you.