NTAP / quant

QUIC implementation for POSIX and IoT platforms
BSD 2-Clause "Simplified" License
289 stars 35 forks source link

Question about 0-RTT #51

Closed timfehr closed 4 years ago

timfehr commented 4 years ago

Hi, I'm playing around with your library for my bachelor thesis and wanted to ask if it is possible to get the server response in the first Handshake during an 0-RTT connection.

At the moment the client is sending the request in the 0-RTT packet. The server is answering this packet with his Handshake packet, containing the ServerHello, Encrypted Extensions and the TLS 1.3 Finished. After this the server sends his Session Ticket and only now it sends the request to the client. I have read in the IETF draft that it is possible the send the response in the first Handshake packet. So is there a way with your lib to do it?

Thanks for your answer in advance.

larseggert commented 4 years ago

Where did you read that? 0-RTT data can be sent by the client, but not the server AFAICT.

timfehr commented 4 years ago

It is allowed to have payload in a Handshake packet, so why not use it for the "early" response from the server? So we have a real 0-RTT data exchange.

larseggert commented 4 years ago

I think you are misunderstanding how 0-RTT works. Only the client gets to send 0-RTT-type packets with STREAM frames (or other data). The server uses 1-RTT packets.

timfehr commented 4 years ago

Yeah it was a misunderstanding.