From b00d52beb0f9fd4a4929b388c2bcf659cbb7d03e Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Tue, 2 Mar 2021 23:06:39 -0800 Subject: [PATCH] Update cryptographic constants --- quinn-proto/src/crypto/rustls.rs | 10 +++++----- quinn-proto/src/packet.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/quinn-proto/src/crypto/rustls.rs b/quinn-proto/src/crypto/rustls.rs index a660e0ecf..947867758 100644 --- a/quinn-proto/src/crypto/rustls.rs +++ b/quinn-proto/src/crypto/rustls.rs @@ -187,10 +187,10 @@ impl crypto::Session for TlsSession { } const RETRY_INTEGRITY_KEY: [u8; 16] = [ - 0xcc, 0xce, 0x18, 0x7e, 0xd0, 0x9a, 0x09, 0xd0, 0x57, 0x28, 0x15, 0x5a, 0x6c, 0xb9, 0x6b, 0xe1, + 0xbe, 0x0c, 0x69, 0x0b, 0x9f, 0x66, 0x57, 0x5a, 0x1d, 0x76, 0x6b, 0x54, 0xe3, 0x68, 0xc8, 0x4e, ]; const RETRY_INTEGRITY_NONCE: [u8; 12] = [ - 0xe5, 0x49, 0x30, 0xf9, 0x7f, 0x21, 0x36, 0xf0, 0x53, 0x0a, 0x8c, 0x1c, + 0x46, 0x15, 0x99, 0xd3, 0x5d, 0x63, 0x2b, 0xf2, 0x23, 0x98, 0x25, 0xbb, ]; impl crypto::HeaderKey for HeaderProtectionKey { @@ -248,7 +248,7 @@ impl crypto::ClientConfig for rustls::ClientConfig { inner: Connection::Client( rustls::ClientConnection::new_quic( self, - Version::V1Draft, + Version::V1, server_name .try_into() .map_err(|_| ConnectError::InvalidDnsName(server_name.into()))?, @@ -267,7 +267,7 @@ impl crypto::ServerConfig for rustls::ServerConfig { got_handshake_data: false, next_secrets: None, inner: Connection::Server( - rustls::ServerConnection::new_quic(self, Version::V1Draft, to_vec(params)).unwrap(), + rustls::ServerConnection::new_quic(self, Version::V1, to_vec(params)).unwrap(), ), }) } @@ -303,7 +303,7 @@ fn to_vec(params: &TransportParameters) -> Vec { } pub(crate) fn initial_keys(dst_cid: &ConnectionId, side: Side) -> Keys { - let keys = rustls::quic::Keys::initial(Version::V1Draft, dst_cid, side.is_client()); + let keys = rustls::quic::Keys::initial(Version::V1, dst_cid, side.is_client()); Keys { header: KeyPair { local: Box::new(keys.local.header), diff --git a/quinn-proto/src/packet.rs b/quinn-proto/src/packet.rs index db57b981f..a2f4eabbc 100644 --- a/quinn-proto/src/packet.rs +++ b/quinn-proto/src/packet.rs @@ -855,8 +855,8 @@ mod tests { assert_eq!( buf[..], hex!( - "ccff00001d0806b858ec6f80452b00004021b1 - b35cedb8ac6906c20c52b09ad2719228310d8f8a51746a75b853060a4e3c0e6e" + "c6ff00001d0806b858ec6f80452b0000402180 + 3ef50807b84191a196f760a6dad1e9d1c6b3e7486fc03729ad1174a9d182574a" )[..] );