Skip to content

Commit 60028fe

Browse files
committed
Merge branch 'diagrams' into diagrams_mt
2 parents 1c96214 + f192883 commit 60028fe

File tree

1 file changed

+58
-51
lines changed

1 file changed

+58
-51
lines changed

draft-ietf-quic-transport.md

Lines changed: 58 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,13 @@ across changes in the client's and the server's network addresses.
306306
# Packet Types and Formats
307307

308308
We first describe QUIC's packet types and their formats, since some are
309-
referenced in subsequent mechanisms. Note that unless otherwise noted, all
310-
values specified in this document are in little-endian format and all field
311-
sizes are in bits.
309+
referenced in subsequent mechanisms.
310+
311+
All numeric values are encoded in network byte order (that is, big-endian) and
312+
all field sizes are in bits. When discussing individual bits of fields, the
313+
least significant bit is referred to as bit 0. Hexadecimal notation is used for
314+
describing the value of fields.
315+
312316

313317
## Common Header
314318

@@ -324,7 +328,7 @@ All QUIC packets begin with a QUIC Common header, as shown below.
324328
+ [Connection ID (64)] +
325329
| |
326330
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
327-
| Payload (*) ...
331+
| Type-Dependent Fields (*) ...
328332
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
329333
~~~
330334

@@ -399,8 +403,8 @@ Check the flags in the common header
399403

400404
## Regular Packets
401405

402-
Each Regular packet contains additional header fields followed by payload, as
403-
shown in {{regular-packet-format}}.
406+
Each Regular packet contains additional header fields followed by an encrypted
407+
payload, as shown below:
404408

405409
~~~
406410
0 1 2 3
@@ -410,7 +414,7 @@ shown in {{regular-packet-format}}.
410414
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
411415
| Packet Number (8/16/32/48) ...
412416
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
413-
| {AEAD Data (*)} ...
417+
| {Encrypted Payload (*)} ...
414418
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
415419
~~~
416420
{: #regular-packet-format title="Regular Packet"}
@@ -426,7 +430,7 @@ The fields in a Regular packet past the Common Header are the following:
426430
by the sender. The first packet sent by an endpoint MUST have a packet number
427431
of 1.
428432

429-
* AEAD Data: The remainder of a Regular packet is both authenticated and
433+
* Encrypted Payload: The remainder of a Regular packet is both authenticated and
430434
encrypted once packet protection keys are available. {{QUIC-TLS}} describes
431435
packet protection in detail. After decryption, the plaintext consists of a
432436
sequence of frames, as shown in {{regular-packet-frames}}. Frames are
@@ -445,7 +449,7 @@ The fields in a Regular packet past the Common Header are the following:
445449
| Frame N (*) ...
446450
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
447451
~~~
448-
{: #regular-packet-frames title="Contents of AEAD Data"}
452+
{: #regular-packet-frames title="Contents of Encrypted Payload"}
449453

450454
### Packet Number Compression and Reconstruction
451455

@@ -488,13 +492,13 @@ at any point in the connection. In other words,
488492
A Regular packet MUST contain at least one frame, and MAY contain multiple
489493
frames and multiple frame types. Frames MUST fit within a single QUIC packet
490494
and MUST NOT span a QUIC packet boundary. Each frame begins with a Frame Type
491-
byte, indicating its type, followed by a type-dependent payload:
495+
byte, indicating its type, followed by additional type-dependent fields:
492496

493497
~~~
494498
0 1 2 3
495499
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
496500
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
497-
| Type (8) | Payload (*) ...
501+
| Type (8) | Type-Dependent Fields (*) ...
498502
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
499503
~~~
500504
{: #frame-layout title="Generic Frame Layout"}
@@ -523,7 +527,7 @@ document.
523527
## Version Negotiation Packet
524528

525529
A Version Negotiation packet is only sent by the server, MUST have the VERSION
526-
flag set, and MUST include the full 64-bit Connection ID. The payload of the
530+
flag set, and MUST include the full 64-bit Connection ID. The remainder of the
527531
Version Negotiation packet is a list of 32-bit versions which the server
528532
supports, as shown below.
529533

@@ -545,13 +549,13 @@ supports, as shown below.
545549
## Public Reset Packet
546550

547551
A Public Reset packet MUST have the PUBLIC_RESET flag set, and MUST include the
548-
full 64-bit connection ID. The payload of the Public Reset packet is TBD.
552+
full 64-bit connection ID. The content of the Public Reset packet is TBD.
549553

550554
~~~
551555
0 1 2 3
552556
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
553557
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
554-
| Public Reset Payload (*) ...
558+
| Public Reset Fields (*) ...
555559
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
556560
~~~
557561
{: #public-reset-format title="Public Reset Packet"}
@@ -653,7 +657,7 @@ QUIC encodes the transport parameters and options as tag-value pairs, all as
653657

654658
* MSPC: Maximum number of incoming streams per connection.
655659

656-
* ICSL: ?
660+
* ICSL: Idle timeout in seconds. The maximum value is 600 seconds (10 minutes).
657661

658662
#### Optional Transport Parameters
659663

@@ -801,10 +805,10 @@ list.
801805

802806
# Frame Types and Formats
803807

804-
As described in {{packetization}}, Regular packets contain one or more frames. We now
805-
describe the various QUIC frame types that can be present in a Regular packet.
806-
The use of these frames and various frame header bits are described in
807-
subsequent sections.
808+
As described in {{packetization}}, Regular packets contain one or more frames.
809+
We now describe the various QUIC frame types that can be present in a Regular
810+
packet. The use of these frames and various frame header bits are described in
811+
subsequent sections.
808812

809813
## STREAM Frame {#frame-stream}
810814

@@ -925,9 +929,11 @@ An ACK frame is shown below.
925929
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
926930
| Largest Acked (8/16/32/48) ...
927931
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
928-
| Ack Delay (16) | Ack Block Section (*) ...
932+
| Ack Delay (16) |
933+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
934+
|[Num Blocks(8)]| Ack Block Section (*) ...
929935
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
930-
| Timestamp Section (*) ...
936+
| NumTS (8) | Timestamp Section (*) ...
931937
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
932938
~~~
933939
{: #ack-format title="ACK Frame Format"}
@@ -941,26 +947,33 @@ The fields in the ACK frame are as follows:
941947
* Ack Delay: Time from when the largest acked, as indicated in the Largest Acked
942948
field, was received by this peer to when this ack was sent.
943949

950+
* Num Blocks (opt): An optional 8-bit unsigned value specifying the number of
951+
additional ack blocks (besides the required First Ack Block) in this ACK
952+
frame. Only present if the 'N' flag bit is 1.
953+
944954
* Ack Block Section: Contains one or more blocks of packet numbers which have
945955
been successfully received. See {{ack-block-section}}.
946956

957+
* Num Timestamps: An unsigned 8-bit number specifying the total number of
958+
<packet number, timestamp> pairs in the Timestamp Section.
959+
947960
* Timestamp Section: Contains zero or more timestamps reporting transit delay of
948961
received packets. See {{timestamp-section}}.
949962

950963

951964
### Ack Block Section {#ack-block-section}
952965

953-
The Ack Block Section contains between one and 256 blocks of packet numbers
954-
which have been successfully received. If the `N` bit in the Type field is 0,
955-
the Num Blocks field is absent and only the First Ack Block length is present.
956-
If the `N` bit is 1, the Num Blocks field indicates how many additional blocks
957-
follow the First Ack Block Length field.
966+
The Ack Block Section contains between one and 256 blocks of packet numbers
967+
which have been successfully received. If the Num Blocks field is absent, only
968+
the First Ack Block length is present in this section. Otherwise, the Num Blocks
969+
field indicates how many additional blocks follow the First Ack Block Length
970+
field.
958971

959972
~~~
960973
0 1 2 3
961974
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
962975
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
963-
|[Num Blocks(8)]| First Ack Block Length (8/16/32/48) ...
976+
| First Ack Block Length (8/16/32/48) ...
964977
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
965978
| [Gap 1 (8)] | [Ack Block 1 Length (8/16/32/48)] ...
966979
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -975,10 +988,6 @@ follow the First Ack Block Length field.
975988

976989
The fields in the Ack Block Section are:
977990

978-
* Num Blocks (opt): An optional 8-bit unsigned value specifying the number of
979-
additional ack blocks (besides the required First Ack Block) in this ACK
980-
frame. Only present if the 'N' flag bit is 1.
981-
982991
* First Ack Block Length: An unsigned packet number delta that indicates the
983992
number of contiguous additional packets being acked starting at the Largest
984993
Acked.
@@ -1001,16 +1010,16 @@ RTT of the connection.
10011010
~~~
10021011
0 1 2 3
10031012
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1004-
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1005-
| Num TS(8) | [Delta LA (8)]|
1013+
+-+-+-+-+-+-+-+-+
1014+
| [Delta LA (8)]|
10061015
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1007-
| [Time Since Largest Acked (32)] |
1016+
| [First Timestamp (32)] |
10081017
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10091018
|[Delta LA 1(8)]| [Time Since Previous 1 (16)] |
10101019
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10111020
|[Delta LA 2(8)]| [Time Since Previous 2 (16)] |
10121021
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1013-
...
1022+
...
10141023
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10151024
|[Delta LA N(8)]| [Time Since Previous N (16)] |
10161025
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1019,17 +1028,14 @@ RTT of the connection.
10191028

10201029
The fields in the Timestamp Section are:
10211030

1022-
* Num Timestamps: An unsigned 8-bit number specifying the total number of
1023-
<packet number, timestamp> pairs following, including the First Timestamp.
1024-
10251031
* Delta Largest Acked (opt): An optional 8-bit unsigned packet number delta
10261032
specifying the delta between the largest acked and the first packet whose
10271033
timestamp is being reported. In other words, this first packet number may
10281034
be computed as (Largest Acked - Delta Largest Acked.)
10291035

10301036
* First Timestamp (opt): An optional 32-bit unsigned value specifying the time
10311037
delta in microseconds, from the beginning of the connection to the arrival
1032-
of this packet.
1038+
of the packet indicated by Delta Largest Acked.
10331039

10341040
* Delta Largest Acked 1..N (opt, repeated): (Same as above.)
10351041

@@ -1072,7 +1078,7 @@ as is specified for the packet number for the enclosing packet's header
10721078
~~~
10731079
{: #stop-waiting-format title="STOP_WAITING Frame Format"}
10741080

1075-
The payload of the STOP_WAITING frame contains a single field:
1081+
The STOP_WAITING frame contains a single field:
10761082

10771083
* Least Unacked Delta: A variable-length packet number delta with the same
10781084
length as the packet header's packet number. Subtract it from the complete
@@ -1103,7 +1109,7 @@ window. The frame is as follows:
11031109
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
11041110
~~~
11051111

1106-
The fields in the WINDOW_UPDATE frame payload are as follows:
1112+
The fields in the WINDOW_UPDATE frame are as follows:
11071113

11081114
* Stream ID: ID of the stream whose flow control windows is being updated, or 0
11091115
to specify the connection-level flow control window.
@@ -1170,17 +1176,18 @@ The fields are:
11701176
The PADDING frame (type=0x00) pads a packet with 0x00 bytes. When this frame is
11711177
encountered, the rest of the packet is expected to be padding bytes. The frame
11721178
contains 0x00 bytes and extends to the end of the QUIC packet. A PADDING frame
1173-
has no payload.
1179+
has no additional fields.
11741180

11751181

11761182
## PING frame {#frame-ping}
11771183

1178-
Endpoints can use PING frames (type=0x07) to verify that their peers are still
1179-
alive or to check reachability to the peer. The PING frame contains no payload.
1180-
The receiver of a PING frame simply needs to ACK the packet containing this
1181-
frame. The PING frame SHOULD be used to keep a connection alive when a stream is
1182-
open. The default is to send a PING frame after 15 seconds of quiescence. A PING
1183-
frame has no payload.
1184+
Endpoints can use PING frames (type=0x07) to verify that their peers are still
1185+
alive or to check reachability to the peer. The PING frame contains no
1186+
additional fields. The receiver of a PING frame simply needs to ACK the packet
1187+
containing this frame. The PING frame SHOULD be used to keep a connection alive
1188+
when a stream is open. The default is to send a PING frame after 15 seconds of
1189+
quiescence. A PING frame has no payload.
1190+
11841191

11851192
## CONNECTION_CLOSE frame {#frame-connection-close}
11861193

@@ -1940,10 +1947,10 @@ TODO: Discuss error handling beyond just listing error codes.
19401947
## Spoofed Ack Attack
19411948
19421949
An attacker receives an STK from the server and then releases the IP address on
1943-
which it received the STK. The attacked may in the future, spoof this same
1944-
address (which now presumably addresses a different endpoint), and initiates a
1950+
which it received the STK. The attacker may, in the future, spoof this same
1951+
address (which now presumably addresses a different endpoint), and initiate a
19451952
0-RTT connection with a server on the victim's behalf. The attacker then spoofs
1946-
ack packets to the server which cause the server to potentially drown the victim
1953+
ACK frames to the server which cause the server to potentially drown the victim
19471954
in data.
19481955
19491956
There are two possible mitigations to this attack. The simplest one is that a

0 commit comments

Comments
 (0)