EasyCrypt Semantic Bridge #
This file bridges EasyCrypt-style reasoning (pRHL judgments, advantage bounds) and CatCrypt's UC security framework (sdist, UCEmulates).
Main results #
Semantic Chain: pRHL → sdist → UC #
pRHL_to_UCEmulates— pRHL equality → UCEmulates at ε = 0sdist_to_UCEmulates— sdist bound → UCEmulates
Module Refinement #
ModuleRefines_comp_right— Post-composition preserves refinementModuleRefines_to_UCEmulates— Module refinement → UCEmulatesmodule_hybrid_bound— n-step hybrid argument
pRHL Vocabulary #
EasyCrypt-style naming for the pRHL judgment.
Equations
- CatCrypt.Crypto.EasyCryptBridge.pRHL Φ c₁ c₂ Ψ = CatCrypt.Relational.rHoare Φ c₁ c₂ Ψ
Instances For
Semantic Chain: pRHL → sdist → UC #
pRHL with equality pre/postconditions implies zero advantage for all distinguishers.
The lifted eqPost relation equals Eq (via Prod.ext).
pRHL equality at all inputs gives pointwise program equality.
pRHL equality → UCEmulates at ε = 0 (SPComp UC). A trivial same-interface lift
(pRHL equality gives π = F, then UCEmulates_refl), so simulator = adversary.
(composition plumbing)
sdist bound → UCEmulates, same interface, via UCEmulates_of_sdist.
(composition plumbing)
IsPure computations with bounded advantage have bounded sdist.
sdist bound → UCEmulates, same interface, via UCEmulates_of_sdist.
(composition plumbing)
Module Refinement #
Two SPComp families (modules) are within sdist ε of each other.
Equations
- CatCrypt.Crypto.EasyCryptBridge.ModuleRefines ε M₁ M₂ = (CatCrypt.Crypto.sdist M₁ M₂ ≤ ε)
Instances For
Post-composition preserves module refinement (right PPL).
Pre-composition with shared prefix preserves refinement (left PPL).
Module refinement (an sdist bound) → UCEmulates, same interface, via
UCEmulates_of_sdist. (composition plumbing)
Compose two module-refinement (sdist) steps into a UCEmulates bound, same interface. (composition plumbing)
Pointwise Equality Bridge #
If two computations are pointwise equal, their sdist is 0.
pRHL at all inputs → ModuleRefines at 0.
Hybrid Argument Support #
n-step hybrid argument at the module level: if each adjacent pair is within ε, the endpoints are within n * ε.