@@ -306,9 +306,13 @@ across changes in the client's and the server's network addresses.
306
306
# Packet Types and Formats
307
307
308
308
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
+
312
316
313
317
# # Common Header
314
318
@@ -324,7 +328,7 @@ All QUIC packets begin with a QUIC Common header, as shown below.
324
328
+ [Connection ID (64)] +
325
329
| |
326
330
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
327
- | Payload (*) ...
331
+ | Type-Dependent Fields (*) ...
328
332
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
329
333
~~~
330
334
@@ -399,8 +403,8 @@ Check the flags in the common header
399
403
400
404
# # Regular Packets
401
405
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 :
404
408
405
409
~~~
406
410
0 1 2 3
@@ -410,7 +414,7 @@ shown in {{regular-packet-format}}.
410
414
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
411
415
| Packet Number (8/16/32/48) ...
412
416
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
413
- | {AEAD Data (*)} ...
417
+ | {Encrypted Payload (*)} ...
414
418
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
415
419
~~~
416
420
{: # regular-packet-format title="Regular Packet"}
@@ -426,7 +430,7 @@ The fields in a Regular packet past the Common Header are the following:
426
430
by the sender. The first packet sent by an endpoint MUST have a packet number
427
431
of 1.
428
432
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
430
434
encrypted once packet protection keys are available. {{QUIC-TLS}} describes
431
435
packet protection in detail. After decryption, the plaintext consists of a
432
436
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:
445
449
| Frame N (*) ...
446
450
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
447
451
~~~
448
- {: # regular-packet-frames title="Contents of AEAD Data "}
452
+ {: # regular-packet-frames title="Contents of Encrypted Payload "}
449
453
450
454
# ## Packet Number Compression and Reconstruction
451
455
@@ -488,13 +492,13 @@ at any point in the connection. In other words,
488
492
A Regular packet MUST contain at least one frame, and MAY contain multiple
489
493
frames and multiple frame types. Frames MUST fit within a single QUIC packet
490
494
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 :
492
496
493
497
~~~
494
498
0 1 2 3
495
499
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
496
500
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
497
- | Type (8) | Payload (*) ...
501
+ | Type (8) | Type-Dependent Fields (*) ...
498
502
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
499
503
~~~
500
504
{: # frame-layout title="Generic Frame Layout"}
@@ -523,7 +527,7 @@ document.
523
527
# # Version Negotiation Packet
524
528
525
529
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
527
531
Version Negotiation packet is a list of 32-bit versions which the server
528
532
supports, as shown below.
529
533
@@ -545,13 +549,13 @@ supports, as shown below.
545
549
# # Public Reset Packet
546
550
547
551
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.
549
553
550
554
~~~
551
555
0 1 2 3
552
556
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
553
557
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
554
- | Public Reset Payload (*) ...
558
+ | Public Reset Fields (*) ...
555
559
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
556
560
~~~
557
561
{: # public-reset-format title="Public Reset Packet"}
@@ -653,7 +657,7 @@ QUIC encodes the transport parameters and options as tag-value pairs, all as
653
657
654
658
* MSPC: Maximum number of incoming streams per connection.
655
659
656
- * ICSL: ?
660
+ * ICSL: Idle timeout in seconds. The maximum value is 600 seconds (10 minutes).
657
661
658
662
# ### Optional Transport Parameters
659
663
@@ -801,10 +805,10 @@ list.
801
805
802
806
# Frame Types and Formats
803
807
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.
808
812
809
813
# # STREAM Frame {#frame-stream}
810
814
@@ -925,9 +929,11 @@ An ACK frame is shown below.
925
929
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
926
930
| Largest Acked (8/16/32/48) ...
927
931
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
928
- | Ack Delay (16) | Ack Block Section (*) ...
932
+ | Ack Delay (16) |
933
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
934
+ |[Num Blocks(8)]| Ack Block Section (*) ...
929
935
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
930
- | Timestamp Section (*) ...
936
+ | NumTS (8) | Timestamp Section (*) ...
931
937
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
932
938
~~~
933
939
{: # ack-format title="ACK Frame Format"}
@@ -941,26 +947,33 @@ The fields in the ACK frame are as follows:
941
947
* Ack Delay: Time from when the largest acked, as indicated in the Largest Acked
942
948
field, was received by this peer to when this ack was sent.
943
949
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
+
944
954
* Ack Block Section: Contains one or more blocks of packet numbers which have
945
955
been successfully received. See {{ack-block-section}}.
946
956
957
+ * Num Timestamps: An unsigned 8-bit number specifying the total number of
958
+ <packet number, timestamp> pairs in the Timestamp Section.
959
+
947
960
* Timestamp Section: Contains zero or more timestamps reporting transit delay of
948
961
received packets. See {{timestamp-section}}.
949
962
950
963
951
964
# ## Ack Block Section {#ack-block-section}
952
965
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.
958
971
959
972
~~~
960
973
0 1 2 3
961
974
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
962
975
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
963
- |[Num Blocks(8)]| First Ack Block Length (8/16/32/48) ...
976
+ | First Ack Block Length (8/16/32/48) ...
964
977
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
965
978
| [Gap 1 (8)] | [Ack Block 1 Length (8/16/32/48)] ...
966
979
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -975,10 +988,6 @@ follow the First Ack Block Length field.
975
988
976
989
The fields in the Ack Block Section are :
977
990
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
-
982
991
* First Ack Block Length: An unsigned packet number delta that indicates the
983
992
number of contiguous additional packets being acked starting at the Largest
984
993
Acked.
@@ -1001,16 +1010,16 @@ RTT of the connection.
1001
1010
~~~
1002
1011
0 1 2 3
1003
1012
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)]|
1006
1015
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1007
- | [Time Since Largest Acked (32)] |
1016
+ | [First Timestamp (32)] |
1008
1017
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1009
1018
|[Delta LA 1(8)]| [Time Since Previous 1 (16)] |
1010
1019
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1011
1020
|[Delta LA 2(8)]| [Time Since Previous 2 (16)] |
1012
1021
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1013
- ...
1022
+ ...
1014
1023
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1015
1024
|[Delta LA N(8)]| [Time Since Previous N (16)] |
1016
1025
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1019,17 +1028,14 @@ RTT of the connection.
1019
1028
1020
1029
The fields in the Timestamp Section are :
1021
1030
1022
- * Num Timestamps: An unsigned 8-bit number specifying the total number of
1023
- <packet number, timestamp> pairs following, including the First Timestamp.
1024
-
1025
1031
* Delta Largest Acked (opt): An optional 8-bit unsigned packet number delta
1026
1032
specifying the delta between the largest acked and the first packet whose
1027
1033
timestamp is being reported. In other words, this first packet number may
1028
1034
be computed as (Largest Acked - Delta Largest Acked.)
1029
1035
1030
1036
* First Timestamp (opt): An optional 32-bit unsigned value specifying the time
1031
1037
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 .
1033
1039
1034
1040
* Delta Largest Acked 1..N (opt, repeated): (Same as above.)
1035
1041
@@ -1072,7 +1078,7 @@ as is specified for the packet number for the enclosing packet's header
1072
1078
~~~
1073
1079
{: # stop-waiting-format title="STOP_WAITING Frame Format"}
1074
1080
1075
- The payload of the STOP_WAITING frame contains a single field :
1081
+ The STOP_WAITING frame contains a single field :
1076
1082
1077
1083
* Least Unacked Delta: A variable-length packet number delta with the same
1078
1084
length as the packet header's packet number. Subtract it from the complete
@@ -1103,7 +1109,7 @@ window. The frame is as follows:
1103
1109
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1104
1110
~~~
1105
1111
1106
- The fields in the WINDOW_UPDATE frame payload are as follows :
1112
+ The fields in the WINDOW_UPDATE frame are as follows :
1107
1113
1108
1114
* Stream ID: ID of the stream whose flow control windows is being updated, or 0
1109
1115
to specify the connection-level flow control window.
@@ -1170,17 +1176,18 @@ The fields are:
1170
1176
The PADDING frame (type=0x00) pads a packet with 0x00 bytes. When this frame is
1171
1177
encountered, the rest of the packet is expected to be padding bytes. The frame
1172
1178
contains 0x00 bytes and extends to the end of the QUIC packet. A PADDING frame
1173
- has no payload .
1179
+ has no additional fields .
1174
1180
1175
1181
1176
1182
# # PING frame {#frame-ping}
1177
1183
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
+
1184
1191
1185
1192
# # CONNECTION_CLOSE frame {#frame-connection-close}
1186
1193
@@ -1940,10 +1947,10 @@ TODO: Discuss error handling beyond just listing error codes.
1940
1947
## Spoofed Ack Attack
1941
1948
1942
1949
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
1945
1952
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
1947
1954
in data.
1948
1955
1949
1956
There are two possible mitigations to this attack. The simplest one is that a
0 commit comments