pub enum KeyChange {
Handshake {
keys: Keys,
},
OneRtt {
keys: Keys,
next: Secrets,
},
}
Expand description
Key material for use in QUIC packet spaces
QUIC uses 4 different sets of keys (and progressive key updates for long-running connections):
- Initial: these can be created from
Keys::initial()
- 0-RTT keys: can be retrieved from
ConnectionCommon::zero_rtt_keys()
- Handshake: these are returned from
ConnectionCommon::write_hs()
afterClientHello
andServerHello
messages have been exchanged - 1-RTT keys: these are returned from
ConnectionCommon::write_hs()
after the handshake is done
Once the 1-RTT keys have been exchanged, either side may initiate a key update. Progressive
update keys can be obtained from the Secrets
returned in KeyChange::OneRtt
. Note that
only packet keys are updated by key updates; header protection keys remain the same.
Variants§
Auto Trait Implementations§
impl Freeze for KeyChange
impl !RefUnwindSafe for KeyChange
impl Send for KeyChange
impl Sync for KeyChange
impl Unpin for KeyChange
impl !UnwindSafe for KeyChange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 240 bytes
Size for each variant:
Handshake
: 64 bytesOneRtt
: 240 bytes