We are exploring options on encrypting messages to 3rd party devices which operate on UDP messages.

Since each vendor will need to implement the encryption-decryption process as well, we would like to re-use the existing standards as much as possible.

But DTLS is considered a no-go because we are using Java, and DTLS only came to Java in version 9 (which is also a no-go). Apart from that, it has several issues which I believe can causes latency.

Apart from DTLS, what other options exist for UDP message encryption?

  • So, you are looking for standard, transport layer encryption methods that handle UDP? – schroeder Aug 30 '18 at 10:28
  • Yes, should based on public private key like tls and not "hardcoded" key encryption – emaayan Aug 30 '18 at 10:32
  • "it has several issues which I believe can causes latency." can you explain that and how other encryption schemes over UDP will not have the same problems? – Patrick Mevzek Aug 30 '18 at 15:18
  • QUIC can be an option but I doubt you will find more implementations of it than of DTLS. "QUIC supports a set of multiplexed connections between two endpoints over User Datagram Protocol (UDP), and was designed to provide security protection equivalent to TLS/SSL, along with reduced connection and transport latency, and bandwidth estimation in each direction to avoid congestion." – Patrick Mevzek Aug 30 '18 at 15:21
  • 1
    If you want to combat all of that you need TCP, not UDP (the paragraph you quote comes after "Datagrams may be lost, duplicated, reordered, or even modified." which is by design in UDP). You are not giving specific data on why you need UDP and not something else. Note that you have also SCTP as an hybrid between TCP and UDP but I am not sure there was anything defined to have all of TLS features in it. – Patrick Mevzek Aug 30 '18 at 17:00

If you can have an additional TCP channel, you could use this channel for TLS and exchange (random) key material which you can use in turn for encrypting the UDP packets. Don't forget to apply a packet counter and possibly timestamps for detecting replay etc. attacks. And use AES-GCM, so you have authentication for (almost) free.

But I don't the part about getting delays because of using DTLS? We are using it in the 500 KB/s range and don't see any delay - having a complete delay of about 1 ms (which is the resolution of the used timestamp^^)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.