Skip to content

Commit 033002c

Browse files
author
Jana Iyengar
committed
Clarifications.
1 parent f6fdbd6 commit 033002c

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

draft-ietf-quic-transport.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ earlier.
355355
+ Connection ID +
356356
| |
357357
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
358-
| Packet Number / Proof |
358+
| Packet Number |
359359
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
360360
| Version |
361361
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -370,27 +370,35 @@ inefficient, long headers MAY be used for 1-RTT packets. The long form allows
370370
for special packets, such as the version negotiation and the public reset
371371
packets to be represented in this uniform fixed-length packet format.
372372

373-
The first octet (octet 0) contains the following fields.
373+
The Flags field (octet 0) contains the following version-independent fields.
374374
* Bit 0 (0x80): HEADER_FORM, set to 1 for long headers.
375375
* Bits 1-7: Packet Type, indicating one of 128 packet types. The following types
376376
are currently defined.
377377
* 01: Version Negotiation packet (see {{version-negotiation-packet}}.)
378378
* 02: Public Reset packet (see {{public-reset-packet}}.)
379379
* 03: Client Cleartext packet (see {{cleartext-packet}}.)
380-
* 04: Server Cleartext packet indicating successful handshake (see
381-
{{cleartext-packet}}.)
380+
* 04: Server Cleartext End-of-Handshake packet (see {{cleartext-packet}}.)
382381
* 05: Other Server Cleartext packet (see {{cleartext-packet}}.)
383382
* 06: 0-RTT Encrypted packet (see {{encrypted-packet}}.)
384383
* 07: 1-RTT Encrypted packet with key phase 0 (see {{encrypted-packet}}.)
385384
* 08: 1-RTT Encrypted packet with key phase 1 (see {{encrypted-packet}}.)
386385

387-
The remainder of the packet layout is the same regardless of type, but the
388-
semantics of the fields are specific to each type (see corresponding sections
389-
for type-specific semantics.)
386+
A long-header packet has the following version-independent fields:
387+
* Octets 1-9: Connection ID
388+
* Octets 10-14: Packet Number
389+
* Octets 15-19: Version
390390

391-
Connection ID considerations are discussed in {{connection-id}}. Each packet is
392-
assigned a packet number by the sender, as described further in
393-
{{packet-number}}.
391+
The remainder of the long-header packet is defined to be specific to a version.
392+
In this version, the rest of the packet contains:
393+
* Octets 20+: Payload
394+
395+
The packet layout is the same for all long-header packet types, but the
396+
semantics of the fields are specific to each packet type. Type-specific
397+
semantics are described in {{version-negotiation-packet}},
398+
{{public-reset-packet}}, {{cleartext-packet}}, and {{encrypted-packet}}.
399+
400+
Connection ID considerations are discussed in {{connection-id}} and packet
401+
number considerations in {{packet-number}}.
394402

395403
## Short Header
396404

@@ -434,15 +442,15 @@ this version, it contains:
434442
* Remainder of this packet: Encrypted Payload (see {{encrypted-payload}}.)
435443

436444

437-
## Version Negotiation Packet {version-negotiation-packet}
445+
## Version Negotiation Packet {#version-negotiation-packet}
438446

439447
A Version Negotiation packet is sent by only the server and is a response to a
440448
client packet of an unsupported version. It uses a long header and contains:
441449

442450
* Octet 0: 0x81 (Flags indicating long header and Version Negotiation packet
443451
type)
444452
* Octets 1-8: Connection ID (echoed)
445-
* Octets 9-12: Proof (first 4 octets of client-selected connection ID)
453+
* Octets 9-12: Packet Number (echoed)
446454
* Octets 13-16: Version (echoed)
447455
* Octets 17+: Payload (version list, containing 0 or more acceptable versions)
448456

@@ -538,15 +546,15 @@ Details to be added.
538546
## Cleartext Packets {#cleartext-packet}
539547

540548
Cleartext packets are sent during the handshake prior to key negotiation. A
541-
client Cleartext packet contains:
549+
Client Cleartext packet contains:
542550

543551
* Octet 0: 0x83 (Flags indicating long header and client Cleartext packet type)
544552
* Octets 1-8: Connection ID (randomly chosen)
545553
* Octets 9-12: Packet number (low 4 octets, starts at a random 31-bit value)
546554
* Octets 13-16: Version
547555
* Octets 17+: Payload
548556

549-
A server Cleartext packet indicating a successful handshake contains:
557+
A Server Cleartext End-of-Handshake packet contains:
550558

551559
* Octet 0: 0x84 (Flags indicating Long header and appropriate server Cleartext
552560
packet type)
@@ -555,7 +563,7 @@ A server Cleartext packet indicating a successful handshake contains:
555563
* Octets 13-16: Version (echoed)
556564
* Octets 17+: Payload
557565

558-
Other server Cleartext packets contain:
566+
Other Server Cleartext packets contain:
559567

560568
* Octet 0: 0x85 (Flags indicating Long header and appropriate server Cleartext
561569
packet type)
@@ -564,15 +572,15 @@ Other server Cleartext packets contain:
564572
* Octets 13-16: Version (echoed)
565573
* Octets 17+: Payload
566574

567-
568575
The client MUST choose a random value and use it as the Connection ID until the
569-
server replies with a server-selected Connection ID. The client's Connection ID
570-
is a suggestion to the server, as described further in {{connection-id}}. A
571-
server may respond to a client Cleartext packet with one of the two server
572-
Cleartext packets, using the server-selected Connection ID on only the final
573-
Cleartext packet that indicates successful handshake completion.
576+
server replies with a server-selected Connection ID. Server-selected Connection
577+
IDs are used after a successful handshake, cleanly distinguishing packets that
578+
use them from packets using client-selected Connection IDs. All packets
579+
including and following a Server Cleartext End-of-Handshake packet use a
580+
server-selected Connection ID, as described in {{connection-id}}.
574581

575582
The payload of Cleartext packets contains frames, as described in {{frames}}.
583+
(TODO: Add hash before frames.)
576584

577585
## Encrypted Packets {#encrypted-packet}
578586

0 commit comments

Comments
 (0)