5 ms·
I have implemented TLS on UDP. Basically to implement an EAP-TTLS authentication service which sets up a TLS tunnel over EAP over RADIUS over UDP. I can attest
by rusk 10y ago
I have implemented TLS on UDP. Basically to implement an EAP-TTLS authentication service which sets up a TLS tunnel over EAP over RADIUS over UDP. I can attest that is "doable" but is horrendously complicated. Not just to implement but to monitor and debug.
It "works" in the case of EAP because you're never sending more than a few datagrams at a time, and if one gets lost it's not a huge tragedy to have to start the whole process again ... but, I can't imagine this being feasible for more continuous data-transfers such as streaming data "oops you lost a packet - sorry you'll have to re-establish your TLS session again"
I did notice the DTLS thing lying around when I was browsing the OpenSSL source but as another commenter says it's not that popular and presumably suffers many of the same complications.
- hamandcheese 10y agoIs there a reason you couldn't use TCP/TLS to establish a shared secret, and then just encrypt all your packets with that?
- rusk 10y agoGosh .. I eh .. I guess I was just given this RFC to implement [0] I'm not sure of the reasoning specifically for doing it this way. But kind of related to your point, TTLS does in fact use the "cryptographic material" derived as part of session establishment to derive a shared secret for hashing in CHAP, MS-CHAP and MS-CHAP-v2! [1] The nifty thing about that is it "binds" the ensuing authentication process to the actual TLS session. With MS-CHAP-v2 it also provides for mutual authentication without either party ever having to exchange sensitive info (neither client nor server ever has to know the password). This was actually a real pain to do with Open SSL as that information wasn't readily available with the standard API. I had to implement some horrific cludge to get the necessary info nested within 3 layers of structs. [0] https://tools.ietf.org/html/rfc5281 https://tools.ietf.org/html/rfc5281 [1] https://tools.ietf.org/html/rfc5281#section-8 https://tools.ietf.org/html/rfc5281#section-8
- platform 10y agoDTLS is a foundation of CoAP protocol (request/response) for the IoT world [1] I personally think, it will see wider usage in upcoming decade.. but it is just a guess. [1] https://projects.eclipse.org/projects/iot.tinydtls https://projects.eclipse.org/projects/iot.tinydtls
- rusk 10y agoGosh I hope so! The current melee of devices chatting away without any security is a big cause for concern.
- Matthias247 10y agoDTLS is also the foundation of webrtc, which is talked about in this topic a lot and which is implemented in most browsers now. This means DTLS is important - but unfortunately not offered by lots of libraries (e.g. not by the Go network/crypto libraries)