pub struct ChannelContext<'a, C: Config, const N: usize, K: KeyStore, R: Rng> {
pub fabrics: &'a RefCell<FabricTable<C, N>>,
pub keys: &'a RefCell<K>,
pub rng: &'a R,
pub window: &'a RefCell<CommissioningWindow>,
pub verifier: &'a Spake2pVerifierData,
pub parameters: &'a PbkdfParameters,
pub now: Instant,
}rustcrypto only.Expand description
What the node brings to a handshake: its credentials, its randomness and its clock.
Borrowed rather than owned, and per call rather than per channel, because every one of these
belongs to the node and outlives any one handshake — and because a Channel that owned them
would need six type parameters to say so.
Fields§
§fabrics: &'a RefCell<FabricTable<C, N>>The fabrics AddNOC created, which is what CASE resolves a destination identifier
against.
keys: &'a RefCell<K>Where private keys live: the key store is the platform’s, never this crate’s.
rng: &'a RThe only source of randomness the handshakes have.
window: &'a RefCell<CommissioningWindow>The commissioning window, which decides whether PASE runs against the factory verifier or an administrator’s (§11.19.8.1), and which closes after twenty failures.
verifier: &'a Spake2pVerifierDataThe factory SPAKE2+ verifier, derived from the printed passcode at manufacture.
parameters: &'a PbkdfParametersThe PBKDF parameters that verifier was derived with.
now: InstantNow. Nothing in this crate reads a clock for itself, so the caller says what time it is.