mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-24 12:13:05 +00:00
Update cryptographic constants
This commit is contained in:
committed by
Dirkjan Ochtman
parent
7c04a155c8
commit
b00d52beb0
@@ -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<u8> {
|
||||
}
|
||||
|
||||
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),
|
||||
|
||||
@@ -855,8 +855,8 @@ mod tests {
|
||||
assert_eq!(
|
||||
buf[..],
|
||||
hex!(
|
||||
"ccff00001d0806b858ec6f80452b00004021b1
|
||||
b35cedb8ac6906c20c52b09ad2719228310d8f8a51746a75b853060a4e3c0e6e"
|
||||
"c6ff00001d0806b858ec6f80452b0000402180
|
||||
3ef50807b84191a196f760a6dad1e9d1c6b3e7486fc03729ad1174a9d182574a"
|
||||
)[..]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user