Documentation

GaudisCrypt.Logic.EagerAbstract

The eager abstract-call rule for modules (EasyCrypt's eager proc on D(O)) #

eager_call (Logic/EagerProc.lean) is EasyCrypt's eager proc for a procedure with holes: it needs the procedure's own steps to swap with the block (SwapLoc) and each hole call to be eager. Here the first condition comes from footprints, as EasyCrypt's comes from its syntactic check that the block and the adversary share no variables.

Confined steps swap with a block outside their region: ConfinedP gives SwapLoc.

theorem GaudisCrypt.eager_call_module {Ω : Type} (X : Lens Ω VariableAssignment) {T : Type 1} [IsModule T] {sig : ProcedureSignature} {holes : HoleSigs} (D : Module.Arr T (Module.Proc sig)) (ext : T → holes.Instantiation) (hD : Module.Representable D ext) (hdisj : FVP.fvP D ≤ X.footprintᶜ) (hc : ∀ {sig' : ProcedureSignature} (a : HoleIndex holes sig'), Countable sig'.ParamType) (S : ProgramDenotation VariableAssignment Unit) (hS : S.inFootprint X.footprint) (O₁ O₂ : T) (horacle : ∀ {sig' : ProcedureSignature} (n : HoleIndex holes sig') (a : sig'.ParamType), S.eagerR S (fun (σ₁ σ₂ : VariableAssignment) => σ₁ = σ₂) (procedureDenotation ((ext O₁).lookup n) a) (procedureDenotation ((ext O₂).lookup n) a) fun (u v : sig'.ret × VariableAssignment) => u = v) (a : sig.ParamType) :
S.eagerR S (fun (σ₁ σ₂ : VariableAssignment) => σ₁ = σ₂) (procedureDenotation (Module.app D O₁).procedure a) (procedureDenotation (Module.app D O₂).procedure a) fun (u v : sig.ret × VariableAssignment) => u = v

EasyCrypt's eager proc for an abstract module (equality invariants): a block S confined to X, and a representable module D disjoint from X, whose oracle procedures are eager (ext O₁ against ext O₂), make D(O₁) eager against D(O₂).