pub struct ResumptionTicket {
pub resumption_secret: [u8; 32],
pub cipher_suite: CipherSuite,
pub created_at: Instant,
pub expires_at: Instant,
}Expand description
Resumption ticket — stored after a successful handshake. Single-use:
SessionCache::try_resume removes the ticket on the first lookup,
which is the one-shot anti-replay guarantee for 0-RTT early-data
(Phase 4.1).
Fields§
§resumption_secret: [u8; 32]Resumption secret — stored verbatim, byte-identical to the
value Session::resumption_hint() hands the client. Both peers
feed it into crypto::kdf::derive_early_data_keying, so the
stored bytes MUST equal the client’s hint — no extra derivation
layer here.
cipher_suite: CipherSuiteNegotiated cipher suite
created_at: InstantWhen the ticket was created
expires_at: InstantWhen the ticket expires
Implementations§
Source§impl ResumptionTicket
impl ResumptionTicket
Sourcepub fn new(
resumption_secret: &[u8; 32],
cipher_suite: CipherSuite,
lifetime: Duration,
) -> Self
pub fn new( resumption_secret: &[u8; 32], cipher_suite: CipherSuite, lifetime: Duration, ) -> Self
Create a ticket holding resumption_secret verbatim.
The caller passes the already-HKDF-derived resumption_secret
(the same value the client’s Session::resumption_hint()
exposes). No further derivation happens here — an extra
derivation layer would desync the server’s stored secret from
the client’s hint and break early-data key agreement.
Trait Implementations§
Source§impl Clone for ResumptionTicket
impl Clone for ResumptionTicket
Source§fn clone(&self) -> ResumptionTicket
fn clone(&self) -> ResumptionTicket
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more