Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Diversity #2175

Closed
ekr opened this issue Dec 14, 2018 · 6 comments
Closed

Key Diversity #2175

ekr opened this issue Dec 14, 2018 · 6 comments
Labels
-tls editorial An issue that does not affect the design of the protocol; does not require consensus.

Comments

@ekr
Copy link
Collaborator

ekr commented Dec 14, 2018

This doesn't look right

In using TLS, the central key schedule of TLS is used.  As a result of the TLS
handshake messages being integrated into the calculation of secrets, the
inclusion of the QUIC transport parameters extension ensures that handshake and
1-RTT keys are not the same as those that might be produced by a server running
TLS over TCP.  However, 0-RTT keys only include the ClientHello message and
might therefore use the same secrets.  To avoid the possibility of
cross-protocol key synchronization, additional measures are provided to improve
key separation.

The CH will also contain the QUIC transport parameters, so why aren't those keys different

@martinthomson
Copy link
Member

Yes, but a TLS/TCP server will ignore those, so it's the transport parameters in EncryptedExtensions that ensure diversity.

This is defense is depth, as it says. What do you think we should say instead?

@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -tls labels Dec 14, 2018
@ekr
Copy link
Collaborator Author

ekr commented Dec 14, 2018

I'm not sure, because I'm not really sure what this is trying to say. Concretely, the concern seems to be that it would be possible to somehow transplant 0-RTT QUIC data onto a TLS-over-TCP connection or vice versa? However, I don't believe this is actually possible even if the same keys are used because QUIC long header packets are incompatible cryptographically with TLS records.

@martinthomson
Copy link
Member

Yes, the transplanting is prevented by many things. The extension, the fact that the formats are incompatible, and key diversity.

@martinduke
Copy link
Contributor

I agree with @ekr. The key separation design is fine, but the sentence about 0-RTT doesn't make any sense. I would delete the sentence about 0-RTT, so it would read thus:

In using TLS, the central key schedule of TLS is used. As a result of the TLS
handshake messages being integrated into the calculation of secrets, the
inclusion of the QUIC transport parameters extension ensures that keys are
not the same as those that might be produced by a server running
TLS over TCP. To further diminish the possibility of cross-protocol key
synchronization, additional measures are provided to improve key separation.

@kazuho
Copy link
Member

kazuho commented Feb 9, 2019

Yeah, I think we can argue that it's not just about using something other than TLS over TCP. We use the protocol name as a prefix because we believe that every protocol needs to use different keys.

I am fine with @martinduke's text, but we can be more clear about the rationale.

@martinthomson
Copy link
Member

The 0-RTT text was written out of an abundance of caution. If:

  1. A server won't accept 0-RTT without successfully processing the ClientHello.
  2. A QUIC server won't successfully process a ClientHello and accept if the quic_transport_parameters extension is absent.
  3. A TLS over TCP server might successfully process a ClientHello and accept 0-RTT if the quic_transport_parameters extension is present.

You get into a situation where the separation we provide for keys and the change in record header format is all that prevents QUIC 0-RTT from being played out as TLS/TCP 0-RTT. I mean, that seems like plenty, it just depends on how much spare paranoia you have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-tls editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

No branches or pull requests

4 participants