Skip to content

Commit e105bbe

Browse files
author
Jana Iyengar
committed
addresses mikebishop's and mt's comments
1 parent a3eee86 commit e105bbe

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

draft-ietf-quic-transport.md

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ The following packet types are defined:
418418

419419
The header form, packet type, connection ID, packet number and version fields of
420420
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.
424424

425425
(TODO: Should the list of packet types be version-independent?)
426426

@@ -439,7 +439,7 @@ semantics are described in {{version-packet}}, {{public-reset-packet}},
439439
|0|C|K| Type |
440440
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
441441
| |
442-
+ Connection ID (optional) +
442+
+ [Connection ID (64)] +
443443
| |
444444
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
445445
| Packet Number (1/2/4) |
@@ -499,14 +499,14 @@ other fields.
499499
{: #short-packet-types title="Short Header Packet Types"}
500500

501501
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
503503
version. See {{version-specific}} for details on how packets from different
504504
versions of QUIC are interpreted.
505505

506506

507507
## Version Negotiation Packet {#version-packet}
508508

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
510510
client packet of an unsupported version. It uses a long header and contains:
511511

512512
* Octet 0: 0x81
@@ -541,7 +541,7 @@ process.
541541
Cleartext packets are sent during the handshake prior to key negotiation. A
542542
Client Cleartext packet contains:
543543
* Octet 0: 0x82
544-
* Octets 1-8: Connection ID (randomly chosen)
544+
* Octets 1-8: Connection ID (initial)
545545
* Octets 9-12: Packet number
546546
* Octets 13-16: Version
547547
* Octets 17+: Payload
@@ -555,16 +555,16 @@ Non-Final Server Cleartext packets contain:
555555

556556
Final Server Cleartext packets contains:
557557
* Octet 0: 0x84
558-
* Octets 1-8: Connection ID (server-selected)
558+
* Octets 1-8: Connection ID (final)
559559
* Octets 9-12: Packet Number
560560
* Octets 13-16: Version
561561
* Octets 17+: Payload
562562

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}}.
568568

569569
The payload of a Cleartext packet contains frames, as described in {{frames}}.
570570

@@ -577,15 +577,15 @@ Packets encrypted with either 0-RTT or 1-RTT keys may be sent with long headers.
577577
Different packet types explicitly indicate the encryption level for ease of
578578
decryption. These packets contain:
579579
* 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)
581581
* Octets 9-12: Packet Number
582582
* Octets 13-16: Version
583583
* Octets 17+: Encrypted Payload
584584

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.
589589

590590
The encrypted payload is both authenticated and encrypted using packet
591591
protection keys. {{QUIC-TLS}} describes packet protection in detail. After
@@ -611,7 +611,7 @@ A Public Reset packet contains:
611611
* Octets 17+: Public Reset Proof
612612

613613
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
615615
includes an echo of the client's packet number (and, depending on the client's
616616
packet number length, 0, 2, or 3 additional octets from the client's packet).
617617

@@ -640,19 +640,20 @@ location in all packet headers, making it straightforward for middleboxes, such
640640
as load balancers, to locate and use it.
641641

642642
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
644644
Connection ID is a suggestion to the server. The server echoes this value in all
645645
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.
651652

652653
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.
656657

657658

658659
## Packet Numbers {#packet-numbers}
@@ -710,27 +711,25 @@ use a shorter packet number encoding.
710711
Between different versions the following things are guaranteed to remain
711712
constant:
712713

713-
* the location and size of the Flags field in both header forms,
714+
* the location and size of the header form bit,
714715

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,
718717

719718
* the location and size of the Connection ID field in both header forms,
720719

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
722721

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.
724723

725724
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
727726
an unsupported version.
728727

729728

730729
# Frames and Frame Types {#frames}
731730

732731
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}}.
734733

735734
~~~
736735
0 1 2 3
@@ -845,16 +844,16 @@ be revalidated once the cryptographic handshake has completed (see
845844
### Using Reserved Versions
846845

847846
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.
850849

851850
The design of version negotiation permits a server to avoid maintaining state
852851
for packets that it rejects in this fashion. However, when the server generates
853852
a Version Negotiation packet, it cannot randomly generate a reserved version
854853
number. This is because the server is required to include the same value in its
855854
transport parameters (see {{version-validation}}). To avoid the selected
856855
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
858857
when later generating its handshake packets.
859858

860859
A pseudorandom function that takes client address information (IP and port) and

0 commit comments

Comments
 (0)