News for hackers. Stuff that matters.
Re:UDP for games – encryption and DDoS protection by MichaelGG on Wednesday April 27, 2016 @09:14PM (#11585950)
>As a side bonus, with proper encryption you can be sure that network errors which corrupt your packets are not going undetected

Shouldn't you be verifying a MAC before decrypting anyways? Relying on decrypting scrambled data, especially for a bitflip, seems like a bad idea.

>Potential attack here is about attacker modifying the (unencrypted/unsigned) data coming to the victim’s Client,

So establish a session key, and include an HMAC on each message? Or not even a session key, if you're worried about re-establishing sessions, but a long-term per-client key (or per-install or whatever). Hardly seems like you need QUIC/DTLS for this simple scenario.

Then all the part about DDoS'ing a UDP connection establishment... Why not just use TCP for sign-in and key establishment, and get 3-way handshake for free. That eliminates spoofing IPs. From there, just have monitors that determine when you're "under attack" and rate limit by IP address, just like any anti-DDoS does. Coming up with all this other stuff seems like an overly complex way.

Re:UDP for games – encryption and DDoS protection by no-bugs on Thursday April 28, 2016 @04:35AM (#11587278)
> Shouldn't you be verifying a MAC before decrypting anyways? Relying on decrypting scrambled data, especially for a bitflip, seems like a bad idea.

Oh, we're going into the realm of MAC-then-encrypt vs Encrypt-then-MAC, which is waaaay out of scope of this book. As it's mentioned in some footnote, under "encryption" I've meant "the whole package, including encryption, integrity authentication, etc." (which is currently routinely done by some kind of AEAD for wired data). I certainly don't want to go into a deep crypto-level discussion of AEAD etc. in a book for app-level developers; what I'm aiming for here, is a simple recipe of "just do it this way, it will work".

> Why not just use TCP for sign-in and key establishment, and get 3-way handshake for free. That eliminates spoofing IPs. From there, just have monitors that determine when you're "under attack" and rate limit by IP address, just like any anti-DDoS does.

But then, for UDP (and you DO need UDP for fast-paced games) you will need your own protected protocol (probably using keys exchanged over TLS-over-TCP). There are many ways to do your own protocol wrong, and only a few to do it right; and if an average app-level developer will try doing it - it is much more often a disaster than not :-(. As a result, I am arguing for using standard security protocols wherever possible (and the anti-DDoS hack described there keeps DTLS security intact, this IS important).

Re:UDP for games – encryption and DDoS protection by no-bugs on Thursday April 28, 2016 @05:04AM (#11587377)
BTW, when I've wrote about those "undetected network errors", I've meant those-network-errors-which-arise-in-UNENCRYPTED-packets (as 16-bit UDP checksum is certainly not enough for this purpose). And DTLS etc. take care of packet corruption themselves (actually, they consider it an attack).
Re:UDP for games – encryption and DDoS protection by astrobe_ on Thursday April 28, 2016 @07:22AM (#11587921)
The UDP checksum is twice unreliable since it's optional.
Re:UDP for games – encryption and DDoS protection by no-bugs on Thursday April 28, 2016 @08:20AM (#11588224)
Since IPv6 it is mandatory, but it still sucks :-(