@@ -780,9 +780,9 @@ an empty context. The size of the secret MUST be the size of the hash output
780
780
for the PRF hash function negotiated by TLS.
781
781
782
782
~~~
783
- client_pp_secret_0 =
783
+ client_pp_secret<0> =
784
784
TLS-Exporter("EXPORTER-QUIC client 1rtt", "", Hash.length)
785
- server_pp_secret_0 =
785
+ server_pp_secret<0> =
786
786
TLS-Exporter("EXPORTER-QUIC server 1rtt", "", Hash.length)
787
787
~~~
788
788
@@ -799,10 +799,10 @@ secret. A Label parameter of "client 1rtt" is used for the client secret and
799
799
the PRF hash function.
800
800
801
801
~~~
802
- client_pp_secret_ <N+1> =
803
- QHKDF-Expand(client_pp_secret_ <N>, "client 1rtt", Hash.length)
804
- server_pp_secret_ <N+1> =
805
- QHKDF-Expand(server_pp_secret_ <N>, "server 1rtt", Hash.length)
802
+ client_pp_secret <N+1> =
803
+ QHKDF-Expand(client_pp_secret <N>, "client 1rtt", Hash.length)
804
+ server_pp_secret <N+1> =
805
+ QHKDF-Expand(server_pp_secret <N>, "server 1rtt", Hash.length)
806
806
~~~
807
807
808
808
This allows for a succession of new secrets to be created as needed.
@@ -816,8 +816,8 @@ HKDF-Expand-Label. QUIC uses the AEAD function negotiated by TLS.
816
816
The packet protection key and IV used to protect the 0-RTT packets sent by a
817
817
client are derived from the QUIC 0-RTT secret. The packet protection keys and
818
818
IVs for 1-RTT packets sent by the client and server are derived from the current
819
- generation of client and server 1-RTT secrets (client_pp_secret_ \<i> and
820
- server_pp_secret_ \<i>) respectively.
819
+ generation of client and server 1-RTT secrets (client_pp_secret \<i> and
820
+ server_pp_secret \<i>) respectively.
821
821
822
822
The length of the QHKDF-Expand output is determined by the requirements of the
823
823
AEAD function selected by TLS. The key length is the AEAD key size. As defined
@@ -833,12 +833,15 @@ key = QHKDF-Expand(S, "key", key_length)
833
833
iv = QHKDF-Expand(S, "iv", iv_length)
834
834
~~~
835
835
836
- For example, client packet protection keys and IVs for AEAD_AES_128_GCM are
836
+ Separate keys are derived for packet protection by clients and servers. Each
837
+ endpoint uses the packet protection key of its peer to remove packet protection.
838
+ For example, client packet protection keys and IVs - which are also used by the
839
+ server to remove the protection added by a client - for AEAD_AES_128_GCM are
837
840
derived from 1-RTT secrets as follows :
838
841
839
842
~~~
840
- client_pp_key_ <i> = QHKDF-Expand(client_pp_secret_ <i>, "key", 16)
841
- client_pp_iv_ <i> = QHKDF-Expand(client_pp_secret_ <i>, "iv", 12)
843
+ client_pp_key <i> = QHKDF-Expand(client_pp_secret <i>, "key", 16)
844
+ client_pp_iv <i> = QHKDF-Expand(client_pp_secret <i>, "iv", 12)
842
845
~~~
843
846
844
847
The QUIC record protection initially starts with keying material derived from
@@ -870,12 +873,12 @@ input.
870
873
Once TLS has provided a key, the contents of regular QUIC packets immediately
871
874
after any TLS messages have been sent are protected by the AEAD selected by TLS.
872
875
873
- The key, K, is either the client packet protection key (client_pp_key_ \<i>) or
874
- the server packet protection key (server_pp_key_ \<i>), derived as defined in
876
+ The key, K, is either the client packet protection key (client_pp_key \<i>) or
877
+ the server packet protection key (server_pp_key \<i>), derived as defined in
875
878
{{key-expansion}}.
876
879
877
880
The nonce, N, is formed by combining the packet protection IV (either
878
- client_pp_iv_ \<i\> or server_pp_iv_ \<i\>) with the packet number. The 64 bits
881
+ client_pp_iv \<i\> or server_pp_iv \<i\>) with the packet number. The 64 bits
879
882
of the reconstructed QUIC packet number in network byte order is left-padded
880
883
with zeros to the size of the IV. The exclusive OR of the padded packet number
881
884
and the IV forms the AEAD nonce.
0 commit comments