Skip to content

Commit 50fab43

Browse files
Merge branch 'master' into encrypt-key-phase
2 parents 129d120 + 41f0838 commit 50fab43

File tree

3 files changed

+130
-31
lines changed

3 files changed

+130
-31
lines changed

draft-ietf-quic-http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ STREAM_CLOSED (0x5):
12971297
: Not applicable, since QUIC handles stream management. Would provoke a
12981298
QUIC_STREAM_DATA_AFTER_TERMINATION from the QUIC layer.
12991299

1300-
FRAME_SIZE_ERROR (0x6)
1300+
FRAME_SIZE_ERROR (0x6):
13011301
: No single mapping. See new error codes defined in {{http-error-codes}}.
13021302

13031303
REFUSED_STREAM (0x7):
@@ -1329,7 +1329,7 @@ Error codes need to be defined for HTTP/2 and HTTP/QUIC separately. See
13291329
# Security Considerations
13301330

13311331
The security considerations of HTTP over QUIC should be comparable to those of
1332-
HTTP/2.
1332+
HTTP/2 with TLS.
13331333

13341334
The modified SETTINGS format contains nested length elements, which could pose
13351335
a security risk to an uncautious implementer. A SETTINGS frame parser MUST

draft-ietf-quic-tls.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,11 @@ in Section 4.8 of {{QUIC-TRANSPORT}}. Since the length of the packet number is
975975
stored in the first octet of the encoded packet number, it may be necessary to
976976
progressively decrypt the packet number.
977977

978+
Packet number protection is applied to the packet number encoded as described
979+
in Section 4.8 of {{QUIC-TRANSPORT}}. Since the length of the packet number is
980+
stored in the first octet of the encoded packet number, it may be necessary to
981+
progressively decrypt the packet number.
982+
978983
Before a TLS ciphersuite can be used with QUIC, a packet protection algorithm
979984
MUST be specifed for the AEAD used with that ciphersuite. This document defines
980985
algorithms for AEAD_AES_128_GCM, AEAD_AES_128_CCM, AEAD_AES_256_GCM,

draft-ietf-quic-transport.md

Lines changed: 123 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ Payload Length:
345345
Packet Number:
346346

347347
: The packet number field is 1, 2, or 4 octets long. The packet number has
348-
confidentiality protection separate from packet protection, as described in
349-
Section 5.6 of {{QUIC-TLS}}. The length of the packet number field is encoded
350-
in the plaintext packet number. See {{packet-numbers}} for details.
348+
confidentiality protection separate from packet protection, as described
349+
in Section 5.6 of {{QUIC-TLS}}. The length of the packet number field is
350+
encoded in the plaintext packet number. See {{packet-numbers}} for details.
351351

352352
Payload:
353353

@@ -1140,6 +1140,7 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
11401140
initial_max_data(1),
11411141
initial_max_bidi_streams(2),
11421142
idle_timeout(3),
1143+
preferred_address(4),
11431144
max_packet_size(5),
11441145
stateless_reset_token(6),
11451146
ack_delay_exponent(7),
@@ -1163,6 +1164,14 @@ language from Section 3 of {{!I-D.ietf-tls-tls13}}.
11631164
};
11641165
TransportParameter parameters<22..2^16-1>;
11651166
} TransportParameters;
1167+
1168+
struct {
1169+
enum { IPv4(4), IPv6(6), (15)} ipVersion;
1170+
opaque ipAddress<4..2^8-1>;
1171+
uint16 port;
1172+
opaque connectionId<0..18>;
1173+
opaque statelessResetToken[16];
1174+
} PreferredAddress;
11661175
~~~
11671176
{: #figure-transport-parameters title="Definition of TransportParameters"}
11681177

@@ -1262,9 +1271,14 @@ stateless_reset_token (0x0006):
12621271
: The Stateless Reset Token is used in verifying a stateless reset, see
12631272
{{stateless-reset}}. This parameter is a sequence of 16 octets.
12641273

1265-
A client MUST NOT include a stateless reset token. A server MUST treat receipt
1266-
of a stateless_reset_token transport parameter as a connection error of type
1267-
TRANSPORT_PARAMETER_ERROR.
1274+
preferred_address (0x0004):
1275+
1276+
: The server's Preferred Address is used to effect a change in server address at
1277+
the end of the handshake, as described in {{preferred-address}}.
1278+
1279+
A client MUST NOT include a stateless reset token or a preferred address. A
1280+
server MUST treat receipt of either transport parameter as a connection error of
1281+
type TRANSPORT_PARAMETER_ERROR.
12681282

12691283

12701284
### Values of Transport Parameters for 0-RTT {#zerortt-parameters}
@@ -1295,6 +1309,10 @@ Omitting or setting a zero value for certain transport parameters can result in
12951309
SHOULD be set to non-zero values for 0-RTT: initial_max_bidi_streams,
12961310
initial_max_uni_streams, initial_max_data, initial_max_stream_data.
12971311

1312+
The value of the server's previous preferred_address MUST NOT be used when
1313+
establishing a new connection; rather, the client should wait to observe the
1314+
server's new preferred_address value in the handshake.
1315+
12981316
A server MUST reject 0-RTT data or even abort a handshake if the implied values
12991317
for transport parameters cannot be supported.
13001318

@@ -1382,7 +1400,7 @@ a different codepoint.
13821400

13831401
A server can process an initial cryptographic handshake messages from a client
13841402
without committing any state. This allows a server to perform address validation
1385-
({{address-validation}}, or to defer connection establishment costs.
1403+
({{address-validation}}), or to defer connection establishment costs.
13861404

13871405
A server that generates a response to an initial packet without retaining
13881406
connection state MUST use the Retry packet ({{packet-retry}}). This packet
@@ -1485,9 +1503,10 @@ therefore unlikely to be successful.
14851503
This token can be provided to the cryptographic handshake immediately after
14861504
establishing a connection. QUIC might also generate an updated token if
14871505
significant time passes or the client address changes for any reason (see
1488-
{{migration}}). The cryptographic handshake is responsible for providing the
1489-
client with the token. In TLS the token is included in the ticket that is used
1490-
for resumption and 0-RTT, which is carried in a NewSessionTicket message.
1506+
{{migration}}). The cryptographic handshake is responsible for
1507+
providing the client with the token. In TLS the token is included in the ticket
1508+
that is used for resumption and 0-RTT, which is carried in a NewSessionTicket
1509+
message.
14911510

14921511

14931512
### Address Validation Token Integrity {#token-integrity}
@@ -1520,12 +1539,12 @@ and a specific peer address, where an address is the two-tuple of IP address and
15201539
port. Path validation tests that packets can be both sent to and received from
15211540
a peer.
15221541

1523-
Path validation is used during connection migration (see {{migration}}) by the
1524-
migrating endpoint to verify reachability of a peer from a new local address.
1525-
Path validation is also used by the peer to verify that the migrating endpoint
1526-
is able to receive packets sent to its new address. That is, that the
1527-
packets received from the migrating endpoint do not carry a spoofed source
1528-
address.
1542+
Path validation is used during connection migration (see {{migration}} and
1543+
{{preferred-address}}) by the migrating endpoint to verify reachability of a
1544+
peer from a new local address. Path validation is also used by the peer to
1545+
verify that the migrating endpoint is able to receive packets sent to the its
1546+
new address. That is, that the packets received from the migrating endpoint do
1547+
not carry a spoofed source address.
15291548

15301549
Path validation can be used at any time by either endpoint. For instance, an
15311550
endpoint might check that a peer is still in possession of its address after a
@@ -1626,12 +1645,12 @@ new address.
16261645
An endpoint MUST NOT initiate connection migration before the handshake is
16271646
finished and the endpoint has 1-RTT keys.
16281647

1629-
This document limits migration of connections to new client addresses.
1630-
Clients are responsible for initiating all migrations. Servers do not send
1631-
non-probing packets (see {{probing}}) toward a client address until it sees a
1632-
non-probing packet from that address. If a client receives packets from an
1633-
unknown server address, the client MAY discard these packets. Migrating a
1634-
connection to a new server address is left for future work.
1648+
This document limits migration of connections to new client addresses, except as
1649+
described in {{preferred-address}}. Clients are responsible for initiating all
1650+
migrations. Servers do not send non-probing packets (see {{probing}}) toward a
1651+
client address until it sees a non-probing packet from that address. If a
1652+
client receives packets from an unknown server address, the client MAY discard
1653+
these packets.
16351654

16361655

16371656
### Probing a New Path {#probing}
@@ -1835,6 +1854,78 @@ need to move to a new connection ID if the address of a peer changes without
18351854
also changing the connection ID.
18361855

18371856

1857+
## Server's Preferred Address {#preferred-address}
1858+
1859+
QUIC allows servers to accept connections on one IP address and attempt to
1860+
transfer these connections to a more preferred address shortly after the
1861+
handshake. This is particularly useful when clients initially connect to an
1862+
address shared by multiple servers but would prefer to use a unicast address to
1863+
ensure connection stability. This section describes the protocol for migrating a
1864+
connection to a preferred server address.
1865+
1866+
Migrating a connection to a new server address mid-connection is left for future
1867+
work. If a client receives packets from a new server address not indicated by
1868+
the preferred_address transport parameter, the client SHOULD discard these
1869+
packets.
1870+
1871+
### Communicating A Preferred Address
1872+
1873+
A server conveys a preferred address by including the preferred_address
1874+
transport parameter in the TLS handshake.
1875+
1876+
Once the handshake is finished, the client SHOULD initiate path validation (see
1877+
{{migrate-validate}}) of the server's preferred address using the connection ID
1878+
provided in the preferred_address transport parameter.
1879+
1880+
If path validation succeeds, the client SHOULD immediately begin sending all
1881+
future packets to the new server address using the new connection ID and
1882+
discontinue use of the old server address. If path validation fails, the client
1883+
MUST continue sending all future packets to the server's original IP address.
1884+
1885+
1886+
### Responding to Connection Migration
1887+
1888+
A server might receive a packet addressed to its preferred IP address at any
1889+
time after the handshake is completed. If this packet contains a PATH_CHALLENGE
1890+
frame, the server sends a PATH_RESPONSE frame as per {{migrate-validate}}, but
1891+
the server MUST continue sending all other packets from its original IP address.
1892+
1893+
The server SHOULD also initiate path validation of the client using its
1894+
preferred address and the address from which it received the client probe. This
1895+
helps to guard against spurious migration initiated by an attacker.
1896+
1897+
Once the server has completed its path validation and has received a non-probing
1898+
packet with a new largest packet number on its preferred address, the server
1899+
begins sending to the client exclusively from its preferred IP address. It
1900+
SHOULD drop packets for this connection received on the old IP address, but MAY
1901+
continue to process delayed packets.
1902+
1903+
1904+
### Interaction of Client Migration and Preferred Address
1905+
1906+
A client might need to perform a connection migration before it has migrated to
1907+
the server's preferred address. In this case, the client SHOULD perform path
1908+
validation to both the original and preferred server address from the client's
1909+
new address concurrently.
1910+
1911+
If path validation of the server's preferred address succeeds, the client MUST
1912+
abandon validation of the original address and migrate to using the server's
1913+
preferred address. If path validation of the server's preferred address fails,
1914+
but validation of the server's original address succeeds, the client MAY migrate
1915+
to using the original address from the client's new address.
1916+
1917+
If the connection to the server's preferred address is not from the same client
1918+
address, the server MUST protect against potential attacks as described in
1919+
{{address-spoofing}} and {{on-path-spoofing}}. In addition to intentional
1920+
simultaneous migration, this might also occur because the client's access
1921+
network used a different NAT binding for the server's preferred address.
1922+
1923+
Servers SHOULD initiate path validation to the client's new address upon
1924+
receiving a probe packet from a different address. Servers MUST NOT send more
1925+
than a minimum congestion window's worth of non-probing packets to the new
1926+
address before path validation is complete.
1927+
1928+
18381929
## Connection Termination {#termination}
18391930

18401931
Connections should remain open until they become idle for a pre-negotiated
@@ -2095,7 +2186,7 @@ describes the format and semantics of the core QUIC frame types.
20952186

20962187
## Variable-Length Integer Encoding {#integer-encoding}
20972188

2098-
QUIC frames use a common variable-length encoding for all non-negative integer
2189+
QUIC frames commonly use a variable-length encoding for non-negative integer
20992190
values. This encoding ensures that smaller integer values need fewer octets to
21002191
encode.
21012192

@@ -3108,12 +3199,11 @@ actually lost.
31083199
### Special Considerations for Packetization Layer PMTU Discovery
31093200

31103201

3111-
The PADDING frame provides a useful option for PMTU probe packets that does not
3112-
exist in other transports. PADDING frames generate acknowledgements, but their
3113-
content need not be delivered reliably. PADDING frames may delay the delivery of
3114-
application data, as they consume the congestion window. However, by definition
3115-
their likely loss in a probe packet does not require delay-inducing
3116-
retransmission of application data.
3202+
The PADDING frame provides a useful option for PMTU probe packets. PADDING
3203+
frames generate acknowledgements, but they need not be delivered reliably. As a
3204+
result, the loss of PADDING frames in probe packets does not require
3205+
delay-inducing retransmission. However, PADDING frames do consume congestion
3206+
window, which may delay the transmission of subsequent application data.
31173207

31183208
When implementing the algorithm in Section 7.2 of {{!PLPMTUD}}, the initial
31193209
value of search_low SHOULD be consistent with the IPv6 minimum packet size.
@@ -4173,6 +4263,10 @@ thanks to all.
41734263

41744264
Issue and pull request numbers are listed with a leading octothorp.
41754265

4266+
## Since draft-ietf-quic-transport-11
4267+
4268+
- Enable server to transition connections to a preferred address (#560,#1251).
4269+
41764270
## Since draft-ietf-quic-transport-10
41774271

41784272
- Swap payload length and packed number fields in long header (#1294)

0 commit comments

Comments
 (0)