by baby · 8y ago · 0 comments
Thinking about it, what would you want for an unreliable stream beside encryption? Isn't DTLS taking care of what you want?
> The issue I have with it is that now it's the application that needs to be sure not to write too much without an additional round-trip, otherwise you could end up with an amplification attack. I remember reading that there was an additional call to be made by the application just for that. But other simplifications in the handshake are actually great, yes.
So, the server is not going to reply unless the client has proven that it owns the source IP address. This should prevent any amplification attack tied to 0-RTT. Or you mean the kind of amplification attack where the client is tricked into talking to the wrong server? This probably could happen in some scenarios, mmm...
I'm thinking that the client wouldn't use 0-RTT without knowing exactly who he's talking to (the cached server configuration is probably tied to the ip:port the client had to connect to the first time around).
> if I remember correctly rotating keys also makes client unable to use the 0-RTT, so you can't do it too often.
I think 0-RTT targets people connecting to the same website multiple times per day. So I can see scenarios where you would rotate it every day? I'd be interested to know how Google configures its own servers.
I just checked, news.google.com has a SSTL of 84:4e:02:00:00:00:00:00 seconds, I think this should be in little endian so it should be around 2 days. This is how much time is left. It's not really informative actually, the SCFG (server config) contains an EXPY field with a unix timestamp indicating 1518350400 (2018/11/02 @ 12:00pm). I realize now that this doesn't tell us much more since it doesn't tell me when the server config was signed :|
> QUIC has a weaker PFS than TLS
Are you comparing it to TLS 1.3? If you're doing a PSK-based handshake with no key exchange, they should provide the same security properties.
> I meant the entropy bit
Can you tell me what you're talking about? I don't know the spec by heart.
The cookie that the server gives to the client is an encryption of source ip and an expiration date, it just looks opaque to the client but the server can decrypt it and check it.
No, the encryption/transport is a nice part, but I'm also working on other stuff like federated authentication. Besides, why would a developer want to use different stacks when he can use one that includes all the others? I believe protocols should be as general as possible, so I really see no reason not to include this.
> Are you comparing it to TLS 1.3? If you're doing a PSK-based handshake with no key exchange, they should provide the same security properties.
I was comparing it to a standard TLS key exchange with PFS enabled.
> Can you tell me what you're talking about? I don't know the spec by heart.
As I said I remember old information so I have not checked the latest draft, but I am sure that after the connection is set up the server and client continue to flip a single bit somewhere, and hash the result. This hash is sent by the client to the server so that the server can check that the client owns the IP and is actually receiving the data.
Don't know if they still have it, but it was there a couple of years ago.
What is it?
> the server and client continue to flip a single bit somewhere, and hash the result
There is a "message authentication hash" being sent in messages and I can't see anything about that in the spec, so that might be it?
But two things about that:
* I don't think it makes much sense to prove that you own the IP after the handshake has been done. It's mostly a countermeasure to DoS attacks for the very first handshake message
* The client should actually be able to roam and change IP without having to re-negotiate a secure connection with the server, as long as it uses the same 64-bit connectionID.
> What is it?
Think Jabber, AD, kerberos, email... those are federated environments.
Basically you tie a user to a domain, have some way to discover all domains, and design an authentication that can be trustworthy enough for the interaction of multiple domains. The end result is that your username is (more or less) trusted on other domains.
Of course, it does not mean that what I'm building is limited to federation, but it simplifies a lot of things after a while.
> There is a "message authentication hash" being sent in messages and I can't see anything about that in the spec, so that might be it?
By the name it is either that or you are talking about the MAC of each packet, but it could be that, yes.
> * I don't think it makes much sense to prove that you own the IP after the handshake has been done. It's mostly a countermeasure to DoS attacks for the very first handshake message
> * The client should actually be able to roam and change IP without having to re-negotiate a secure connection with the server, as long as it uses the same 64-bit connectionID.
Yes, I think only QUIC has such a mechanism. It was probably introduced exactly to handle roaming stations, and avoid having to require another check before the server can send data to the new IP. If no such check is in place, then you could start a file transfer and then spoof the source IP to that of someone you wanted to DoS.
Video?
By reliable-multicast I mean something like having a main multicast stream plus a unicast that delivers only the lost data.
DTLS multicast also kind of sucks because all clients share the same keys for the MAC, meaning that the clients could spoof the server data towards other clients.
Also, I am afraid the Forward Error correction of QUIC is a bit too basic to be really useful, which is why I developed a second library with more flexible FEC than just implementing raid-4 over the network.
I am designing my protocol with that transport in mind, because I did not want to limit the user in what he could do.
You can do all of this on the application, you can use even multiple stacks, but the upper layers are usually less efficient, more error prone, and we cause a global "reinvent the wheel" movement without even realizing it.
That's an interesting point, indeed the RFC[1] seems to support your claim:
> DTLS implementations maintain (at least notionally) a > next_receive_seq counter. This counter is initially set to zero. > When a message is received, if its sequence number matches > next_receive_seq, next_receive_seq is incremented and the message is > processed. If the sequence number is less than next_receive_seq, the > message MUST be discarded. If the sequence number is greater than > next_receive_seq, the implementation SHOULD queue the message but MAY > discard it. (This is a simple space/bandwidth tradeoff).
[1]: https://tools.ietf.org/html/rfc6347
> DTLS multicast
I'm not seeing mentions of that in the RFC
> Forward Error correction of QUIC
I'm looking at the QUIC spec and I don't see anything about that, there doesn't seem to be any error correction done in QUIC (perhaps at the UDP level with the checksum you mean?)