pub(crate) struct KeySchedulePreHandshake {
ks: KeySchedule,
}
Expand description
The “early secret” stage of the key schedule.
Call KeySchedulePreHandshake::new
to create it without
a PSK, or use From<KeyScheduleEarly>
to create it with
a PSK.
0
|
v
PSK -> HKDF-Extract = Early Secret
|
+-----> Derive-Secret(., "ext binder" | "res binder", "")
| = binder_key
|
+-----> Derive-Secret(., "c e traffic", ClientHello)
| = client_early_traffic_secret
|
+-----> Derive-Secret(., "e exp master", ClientHello)
| = early_exporter_master_secret
v
Derive-Secret(., "derived", "")
Fields§
§ks: KeySchedule
Implementations§
Source§impl KeySchedulePreHandshake
impl KeySchedulePreHandshake
Sourcepub(crate) fn new(suite: &'static Tls13CipherSuite) -> Self
pub(crate) fn new(suite: &'static Tls13CipherSuite) -> Self
Creates a key schedule without a PSK.
Sourcepub(crate) fn into_handshake(
self,
shared_secret: SharedSecret,
) -> KeyScheduleHandshakeStart
pub(crate) fn into_handshake( self, shared_secret: SharedSecret, ) -> KeyScheduleHandshakeStart
shared_secret
is the “(EC)DHE” secret input to
“HKDF-Extract”:
(EC)DHE -> HKDF-Extract = Handshake Secret
Trait Implementations§
Source§impl From<KeyScheduleEarly> for KeySchedulePreHandshake
Creates a key schedule with a PSK.
impl From<KeyScheduleEarly> for KeySchedulePreHandshake
Creates a key schedule with a PSK.
Source§fn from(_: KeyScheduleEarly) -> Self
fn from(_: KeyScheduleEarly) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KeySchedulePreHandshake
impl !RefUnwindSafe for KeySchedulePreHandshake
impl Send for KeySchedulePreHandshake
impl Sync for KeySchedulePreHandshake
impl Unpin for KeySchedulePreHandshake
impl !UnwindSafe for KeySchedulePreHandshake
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