KEY: Shared Key Management Game #
The KEY game manages shared keys indexed by session identifiers (SID).
Overview #
Two variants parameterized by b : Bool:
b = false(real): stores actual shared keys provided by the callerb = true(ideal): replaces honest keys with freshly sampled random keys
Oracles #
kset: Honest key set — stores actual key (real) or random key (ideal)kcset: Corrupt key set — always stores the provided key directlykget: Retrieve the stored shared key for a sessionkhon: Check whether a session's key was set honestly
References #
- Rocq SSProve: theories/Cryptobox/KEY.v
- Dupressoir et al., CSF 2022 (Section 4.2)
Heap Locations #
State is stored in the global heap via typed locations.
Locations are @[reducible] so that .ty reduces for type checking.
Shared key storage: SID → SharedKey. Default: all default.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Honesty flags for shared keys: SID → Bool. Default: all false (unset).
Equations
- CatCrypt.Examples.Cryptobox.keyHonestLoc = { id := 201, ty := CatCrypt.Examples.Cryptobox.SID → Bool, fintype := Pi.instFintype, inhabited := Pi.instInhabited }
Instances For
Oracle Definitions #
Each oracle is an SPComp computation that reads/writes heap locations.
The b : Bool parameter in keySetOracle switches between real and ideal behavior.
KSET oracle: set the shared key for a session.
If the session already has a key set (honest or corrupt), fails.
If b = false (real): stores the provided key k.
If b = true (ideal): samples a fresh random key and stores that instead.
Equations
- One or more equations did not get rendered due to their size.
Instances For
KCSET oracle: corrupt key set — always stores the provided key directly. Marks the session as not honest (corrupt).
Equations
- One or more equations did not get rendered due to their size.
Instances For
KGET oracle: retrieve the stored shared key for a session.
Equations
- CatCrypt.Examples.Cryptobox.keyGetOracle sid = do let store ← CatCrypt.Core.SPComp.get CatCrypt.Examples.Cryptobox.keyStoreLoc CatCrypt.Core.SPComp.pure (store sid)
Instances For
KHON oracle: check whether a session's key was set honestly.
Equations
- CatCrypt.Examples.Cryptobox.keyHonOracle sid = do let honest ← CatCrypt.Core.SPComp.get CatCrypt.Examples.Cryptobox.keyHonestLoc CatCrypt.Core.SPComp.pure (honest sid)
Instances For
Oracle Record #
Oracle interface for KEY games.
- kset : SID → CryptoTypes.SharedKey → Core.SPComp Unit
- kcset : SID → CryptoTypes.SharedKey → Core.SPComp Unit
- kget : SID → Core.SPComp CryptoTypes.SharedKey
- khon : SID → Core.SPComp Bool
Instances For
KEY Game #
KEY game parameterized by real/ideal behavior b.
b = false: real — honest keys are stored as providedb = true: ideal — honest keys are replaced with random samples
Equations
- One or more equations did not get rendered due to their size.