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

Implicit acknowledgment during handshake #627

Closed
ekr opened this issue Jun 13, 2017 · 14 comments
Closed

Implicit acknowledgment during handshake #627

ekr opened this issue Jun 13, 2017 · 14 comments
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects

Comments

@ekr
Copy link
Collaborator

ekr commented Jun 13, 2017

The motivation for this issue is: What happens if you receive a ServerCleartext packet that contains SH but doesn't contain the acknowledgement for CI? Should you eventually retransmit CI? This doesn't make sense, but the protocol suggests you should.

We could just make it an exception, but I think we might want to go bigger. Specifically, I propose we take the data in ClientInitial out of stream 0 and make it special data. It is anyway because it can't be fragmented, has to be padded, etc. Then the client's second flight would go in stream 0 at offset 0.

@mikkelfj
Copy link
Contributor

Related question - why does the client send end of handshake in a cleartext packets after receiving server handshake, except for retransmission of earlier packets no longer needed.

QUIC TLS draft section 4.1:

@C QUIC STREAM Frame(s) <0>:
(EndOfEarlyData)
{Finished}

@ekr
Copy link
Collaborator Author

ekr commented Jun 13, 2017

It avoids double-encryption of the TLS handshake packets.

@martinthomson martinthomson added -transport design An issue that affects the design of the protocol; resolution requires consensus. labels Jun 13, 2017
@mikkelfj
Copy link
Contributor

mikkelfj commented Jun 13, 2017

It avoids double-encryption of the TLS handshake packets.

I may get the following wrong, as I haven't studied everything in detail yet, but my take is, ignoring 0RTT:

If the server was required to only respond with a single packet, and double encryption was acceptible (which I think is no problem at all), then the handshake could have the form:

@c ClientInitial ->
<-c ServerInitial
@1 stream 0{EndOfEarlyData, Finished}, Optionally other streams ->

No ACKS in server to client, no acks in client to server.

If these initial packets are made special, as you suggest with ClientInitial, we can also drop packet numbering of these.

This also avoids the issue with ACKS of untrusted packets during handshake: #624

@mikkelfj
Copy link
Contributor

mikkelfj commented Jun 13, 2017

In addition, I suggest that ServerInitial sends (reflects) the Client Connection ID (CCID) and ALSO sends a new Server Connection ID (SCID). This uniquely links the client request to the server response, and also handles Stateless Retry and Version Negotiation packet responses if these do the same thing, mirroring CCID except these other packets won't have a SCID. In addition, this would avoid having to rely on the uniqueness of a 5-tuple for setting up and maintaining connection state.

@ekr
Copy link
Collaborator Author

ekr commented Jun 13, 2017

"If the server was required to only respond with a single packet..."

This is not a reasonable assumption. Certificates regularly push you over the MTU.

@mikkelfj
Copy link
Contributor

This is not a reasonable assumption. Certificates regularly push you over the MTU.

Could this not also happen to client certificates when server requires auth?

Could certs be seperate from Diffie-Hellman?

@ekr
Copy link
Collaborator Author

ekr commented Jun 13, 2017

Could this not also happen to client certificates when server requires auth?

Yes.

Could certs be seperate from Diffie-Hellman?

They are. Client certificates are sent in the second flight.

@mikkelfj
Copy link
Contributor

They are. Client certificates are sent in the second flight.

So in principle this could also apply to server certs, and then you could have fully protected packets except for the initial key exchange.

@mikkelfj
Copy link
Contributor

It would also deal with #597,#608 - especially if CCID is reflected, and paired with SCID when available, on all unprotected server sent packets.

@ekr
Copy link
Collaborator Author

ekr commented Jun 13, 2017

This would add a new type of complexity because the keys that are available after the initial key exchange are not the same as those which are available after the handshake completes.

@mikkelfj
Copy link
Contributor

Is that necessarily so, given stateless retry? And key phase must be handled anyway. I don't want to add complexity though.

@ekr
Copy link
Collaborator Author

ekr commented Jun 13, 2017 via email

@mnot mnot added this to Odd Jobs in QUIC Jun 21, 2017
@mnot mnot moved this from Odd Jobs to Packets in QUIC Jun 21, 2017
@mnot mnot moved this from Packets to Handshake in QUIC Jun 21, 2017
@martinthomson martinthomson changed the title ClientInitial is special Initial packet is special Nov 7, 2017
@martinthomson
Copy link
Member

Editors discussed this, and for both Handshake and Retry from the server, we will mandate the inclusion of ACK. This allows clients to drive loss detection based purely on ACK logic. However, we will encourage clients not to send more Initial packets if they get packets from the server. This might be happen if they receive packets out of order or the packet with ACK is lost. The client can then ACK rather than retransmitting the Initial.

Note that this creates a situation that makes no sense. If the client receives an out-of-order packet from the server, it will assume that the Initial was lost and might reasonable send a Handshake containing an ACK and the ClientHello. We need to separately disable sending Initial if packets are received (and only re-enable it if the packet was VN/Retry - both of those cause a new Initial packet to be created).

@martinthomson martinthomson changed the title Initial packet is special Implicit acknowledgment of Initial Mar 14, 2018
@martinthomson
Copy link
Member

Note that the issue OP makes a proposal. I think that we're in the process of discussing that particular issue, but we need a little more clarity on that problem. When that discussion matures some more, we can open an issue for stream 0 usage and offsets, etc...

@martinthomson martinthomson changed the title Implicit acknowledgment of Initial Implicit acknowledgment during handshake Mar 14, 2018
janaiyengar added a commit to marten-seemann/base-drafts that referenced this issue Mar 15, 2018
See discussion in quicwg#627 for the stronger language for ACK frames.

Closes quicwg#1067. Updates quicwg#627.
@mnot mnot added the has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
No open projects
QUIC
Handshake
Development

No branches or pull requests

4 participants