@@ -418,9 +418,9 @@ The following packet types are defined:
418
418
419
419
The header form, packet type, connection ID, packet number and version fields of
420
420
a long header packet are version independent. The types of packets defined in
421
- {{long-packet-types}} and the rest of the packet is specific to a version. See
422
- {{version-specific}} for details on how packets from different versions of QUIC
423
- are interpreted.
421
+ {{long-packet-types}} and the the rest of the packet is specific to a version
422
+ and packet type. See {{version-specific}} for details on how packets from
423
+ different versions of QUIC are interpreted.
424
424
425
425
(TODO : Should the list of packet types be version-independent?)
426
426
@@ -439,7 +439,7 @@ semantics are described in {{version-packet}}, {{public-reset-packet}},
439
439
|0|C|K| Type |
440
440
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
441
441
| |
442
- + Connection ID (optional) +
442
+ + [ Connection ID (64)] +
443
443
| |
444
444
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
445
445
| Packet Number (1/2/4) |
@@ -499,14 +499,14 @@ other fields.
499
499
{: # short-packet-types title="Short Header Packet Types"}
500
500
501
501
The header form, connection ID flag and connection ID of a short header packet
502
- are version independent. The remaining fields are specific to the selected QUIC
502
+ are version- independent. The remaining fields are specific to the selected QUIC
503
503
version. See {{version-specific}} for details on how packets from different
504
504
versions of QUIC are interpreted.
505
505
506
506
507
507
# # Version Negotiation Packet {#version-packet}
508
508
509
- A Version Negotiation packet is sent only by the server and is a response to a
509
+ A Version Negotiation packet is sent only by servers and is a response to a
510
510
client packet of an unsupported version. It uses a long header and contains :
511
511
512
512
* Octet 0: 0x81
@@ -541,7 +541,7 @@ process.
541
541
Cleartext packets are sent during the handshake prior to key negotiation. A
542
542
Client Cleartext packet contains :
543
543
* Octet 0: 0x82
544
- * Octets 1-8: Connection ID (randomly chosen )
544
+ * Octets 1-8: Connection ID (initial )
545
545
* Octets 9-12: Packet number
546
546
* Octets 13-16: Version
547
547
* Octets 17+: Payload
@@ -555,16 +555,16 @@ Non-Final Server Cleartext packets contain:
555
555
556
556
Final Server Cleartext packets contains :
557
557
* Octet 0: 0x84
558
- * Octets 1-8: Connection ID (server-selected )
558
+ * Octets 1-8: Connection ID (final )
559
559
* Octets 9-12: Packet Number
560
560
* Octets 13-16: Version
561
561
* Octets 17+: Payload
562
562
563
- The client MUST choose a random 64-bit value and use it as the Connection ID in
564
- all packets until the server replies with a server-selected Connection ID. The
565
- server echoes the client's Connection ID in Non-Final Server Cleartext packets.
566
- All packets including and following the first Final Server Cleartext packet MUST
567
- use a server-selected Connection ID, as described in {{connection-id}}.
563
+ The client MUST choose a random 64-bit value and use it as the initial
564
+ Connection ID in all packets until the server replies with the final Connection
565
+ ID. The server echoes the client's Connection ID in Non-Final Server Cleartext
566
+ packets. All packets including and following the first Final Server Cleartext
567
+ packet MUST use the final Connection ID, as described in {{connection-id}}.
568
568
569
569
The payload of a Cleartext packet contains frames, as described in {{frames}}.
570
570
@@ -577,15 +577,15 @@ Packets encrypted with either 0-RTT or 1-RTT keys may be sent with long headers.
577
577
Different packet types explicitly indicate the encryption level for ease of
578
578
decryption. These packets contain :
579
579
* Octet 0: 0x85, 0x86 or 0x87
580
- * Octets 1-8: Connection ID (client- or server-selected )
580
+ * Octets 1-8: Connection ID (initial or final )
581
581
* Octets 9-12: Packet Number
582
582
* Octets 13-16: Version
583
583
* Octets 17+: Encrypted Payload
584
584
585
- A flags octet of 0x85 indicates a 0-RTT packet. Key phases are used by the QUIC
586
- packet protection to identify the correct packet protection keys after the 1-RTT
587
- keys are established . The default initial value key phase is 0. See {{QUIC-TLS}}
588
- for more details.
585
+ A first octet of 0x85 indicates a 0-RTT packet. After the 1-RTT keys are
586
+ established, key phases are used by the QUIC packet protection to identify the
587
+ correct packet protection keys . The default initial value key phase is 0. See
588
+ {{QUIC-TLS}} for more details.
589
589
590
590
The encrypted payload is both authenticated and encrypted using packet
591
591
protection keys. {{QUIC-TLS}} describes packet protection in detail. After
@@ -611,7 +611,7 @@ A Public Reset packet contains:
611
611
* Octets 17+: Public Reset Proof
612
612
613
613
For a client that sends a connection ID on every packet, the Connection ID field
614
- is simply an echo of the client's Connection ID and the Packet Number field
614
+ is simply an echo of the initial Connection ID, and the Packet Number field
615
615
includes an echo of the client's packet number (and, depending on the client's
616
616
packet number length, 0, 2, or 3 additional octets from the client's packet).
617
617
@@ -640,19 +640,20 @@ location in all packet headers, making it straightforward for middleboxes, such
640
640
as load balancers, to locate and use it.
641
641
642
642
When a connection is initiated, the client MUST choose a random value and use it
643
- as the Connection ID until a server-selected value is available. The client's
643
+ as the initial Connection ID until the final value is available. The initial
644
644
Connection ID is a suggestion to the server. The server echoes this value in all
645
645
packets until the handshake is successful (see {{QUIC-TLS}}. On a successful
646
- handshake, the server selects a Connection ID to use for the rest of the
647
- connection and indicates it to the client in Final Server Cleartext packets. All
648
- subsequent packets from the server MUST contain this value. On handshake
649
- completion, the client MUST switch to using the server-selected Connection ID
650
- for all subsequent packets.
646
+ handshake, the server MUST select the final Connection ID for the connection and
647
+ use it in Final Server Cleartext packets. This final Connection ID MAY be the
648
+ one proposed by the client or MAY be a new server-selected value. All subsequent
649
+ packets from the server MUST contain this value. On handshake completion, the
650
+ client MUST switch to using the final Connection ID for all subsequent
651
+ packets.
651
652
652
653
Thus, all Client Cleartext packets, 0-RTT Encrypted packets, and Non-Final
653
- Server Cleartext packets MUST use the client's randomly-generated Connection ID.
654
- Final Server Cleartext packets, 1-RTT Encrypted packets, and all short-header
655
- packets MUST use the server-selected Connection ID.
654
+ Server Cleartext packets MUST use the client's randomly-generated initial
655
+ Connection ID. Final Server Cleartext packets, 1-RTT Encrypted packets, and all
656
+ short-header packets MUST use the final Connection ID.
656
657
657
658
658
659
# # Packet Numbers {#packet-numbers}
@@ -710,27 +711,25 @@ use a shorter packet number encoding.
710
711
Between different versions the following things are guaranteed to remain
711
712
constant :
712
713
713
- * the location and size of the Flags field in both header forms ,
714
+ * the location and size of the header form bit ,
714
715
715
- * the location of the HEADER_FORM bit in the Flags field in both header forms,
716
-
717
- * the location of the CONNECTION_ID bit in the Flags field in short headers,
716
+ * the location of the Connection ID Flag in short headers,
718
717
719
718
* the location and size of the Connection ID field in both header forms,
720
719
721
- * the location and value of the Version field in long headers, and
720
+ * the location and size of the Version field in long headers, and
722
721
723
- * the location and value of the Packet Number field in long headers.
722
+ * the location and size of the Packet Number field in long headers.
724
723
725
724
Implementations MUST assume that an unsupported version uses an unknown packet
726
- format. All other values MUST be ignored when processing a packet that contains
725
+ format. All other fields MUST be ignored when processing a packet that contains
727
726
an unsupported version.
728
727
729
728
730
729
# Frames and Frame Types {#frames}
731
730
732
731
The payload of cleartext packets and the plaintext after decryption of encrypted
733
- packets consists of a sequence of frames, as shown in {{packet-frames}}.
732
+ payloads consists of a sequence of frames, as shown in {{packet-frames}}.
734
733
735
734
~~~
736
735
0 1 2 3
@@ -845,16 +844,16 @@ be revalidated once the cryptographic handshake has completed (see
845
844
# ## Using Reserved Versions
846
845
847
846
For a server to use a new version in the future, clients must correctly handle
848
- unsupported versions. To ensure this, a server SHOULD include a reserved version
849
- (see {{versions}}) while generating a Version Negotiation packet.
847
+ unsupported versions. To help ensure this, a server SHOULD include a reserved
848
+ version (see {{versions}}) while generating a Version Negotiation packet.
850
849
851
850
The design of version negotiation permits a server to avoid maintaining state
852
851
for packets that it rejects in this fashion. However, when the server generates
853
852
a Version Negotiation packet, it cannot randomly generate a reserved version
854
853
number. This is because the server is required to include the same value in its
855
854
transport parameters (see {{version-validation}}). To avoid the selected
856
855
version number changing during connection establishment, the reserved version
857
- can be generated as a function of values that will be available to the server
856
+ SHOULD be generated as a function of values that will be available to the server
858
857
when later generating its handshake packets.
859
858
860
859
A pseudorandom function that takes client address information (IP and port) and
0 commit comments