4 ms·
What are the sorts of things (that aren't secure messaging) for which Noise-based solutions might be suitable and for which TLS isn't?
by pvg 10y ago
What are the sorts of things (that aren't secure messaging) for which Noise-based solutions might be suitable and for which TLS isn't?
- tptacek 10y agoActually a tough question and getting tougher with TLS 1.3: if you can use Noise, you can also configure TLS down to a reasonable configuration that uses only solid primitives and doesn't rely on the TLS PKI. The answer is probably: you should use TLS, and if you're in a place where you really should consider something like Noise or Noise Pipes, you'll probably know it. The place where it really starts to make sense to think about Noise is when you're already committed to doing a custom protocol. Jason Donenfeld's Wireguard is a great example: a fresh protocol makes a lot of sense for a new VPN transport. Ironically, in the context of a secure messenger, the Noise/TLS distinction isn't really important at all. The important cryptography in an E2E-secure messenger happens at a layer higher than the transport itself. Later Spitballed this question on crypto dork Slack and there is a use case with a clear answer: if you're doing a datagram transport rather than TCP streams, Noise is probably always a clear win. DTLS is a mess.
- baby 10y agoFrom that slack convo, I disagreed. DTLS specifies everything for UDP: what happens if you receive messages out of order? or if the datagram length is not enough for a message? or if you drop messages? or if someone actively MITM you (easy in UDP)? DTLS specifies all these things. Noise doesn't. It's up to you to find out a way to make it work for UDP. Not that Noise specifies how to implement it on top of TCP, but it's more straight-forward there. I was also told that Wireguard uses Noise on top of UDP, so it would be interesting to see what they did there. Another good point for Noise: if you're planning to implement a TLS-like protocol from scratch, I would go for Noise instead of TLS. It's just simpler, lighter and easy to customize to your own needs.
- zx2c4 10y agoIndeed DTLS is a "pipe", whereas pure Noise isn't, and pure Noise doesn't have any DoS protection, which DTLS does. But indeed DTLS is a mess for other reasons. For WireGuard I use Noise with stronger DoS resistance and anti replay measures than DTLS, custom tailored for being a layer 3 tunnel. Details here: https://www.wireguard.io/papers/wireguard.pdf https://www.wireguard.io/papers/wireguard.pdf
- problems 10y ago> if someone actively MITM you (easy in UDP) In what way is MITM easier in UDP than TCP? Assuming you use similar techniques to verify your connection, I can't see a difference.
- baby 10y agoYou don't need to do anything to pretend you are the source address. Whereas in TCP you need to guess some random seq number.
- pvg 10y agoYep, thanks, I think I actually misunderstood the 'framework' level range of Noise (I thought you could 'easily' make Signal out of Noise). There's a video on their wiki that's also a good summary of what it's about. https://www.youtube.com/watch?v=ceGTgqypwnQ https://www.youtube.com/watch?v=ceGTgqypwnQ