rustcrypto only.Expand description
Secure sessions: what PASE and CASE produce, and what every later message rides on (Core §4.13).
A session is a pair of directional keys plus the bookkeeping that makes them safe to use: a counter that never repeats, a replay window for the peer’s counters, and the identity the peer proved. Both PASE and CASE end by installing one.
§Directional keys, and the trap in them
Session establishment produces two keys — I2RKey for initiator-to-responder and
R2IKey for the other way — and which one a node encrypts with depends on which end it
was. §4.14.1: “The initiator SHALL use I2RKey to encrypt … and the R2IKey to decrypt …
The responder SHALL use R2IKey to encrypt … and the I2RKey to decrypt.”
Getting that backwards produces a node that cannot talk to anything and can talk
perfectly to itself, so it survives every test written against another instance of the
same bug. SecureSession::encrypt_keys and SecureSession::decrypt_keys pick from
the recorded Role, so the choice is made once, in one place.
Structs§
- Established
Keys - The three keys session establishment derives (§4.14.1, §4.14.2.7).
- Secure
Session - One established secure session (§4.13.2).
- Session
Table - The fixed-capacity set of established sessions.
Enums§
- Role
- Which end of session establishment this node was.
- Session
Kind - How a session was established.
Constants§
- SESSION_
KEYS_ INFO SEKeys_Info— “SessionKeys” (Core §4.14.1, §4.14.2.7).