Unary Probabilistic Hoare Logic (pHL) #
This module provides a unary probabilistic Hoare logic for CatCrypt, inspired by EasyCrypt's pHL and CertiCrypt's unary reasoning.
Submodules #
Judgment-pHoare P c Qdefinition and basic propertiesLossless-isLosslesspredicate and losslessness of basic operationsRules- Proof rules: ret, fail, sample, get, set, bind, assert, frameEvent- Event probabilityprEventand bounds (union, complement, monotone)Bridge- Connections between pHL, pRHL, and probability (FEL, byphoare)FailureEvent- Enhanced failure event lemma variants for game hoppingQueryBound- Query-bounded adversary infrastructure
What's Novel #
This entire unary logic layer is new to CatCrypt - the Rocq version (CatCrypt/Coq) has only a relational logic (pRHL). The unary logic enables:
- Probability bounds: Direct computation of
Pr[G:E]from pHL judgments - Failure Event Lemma: Up-to-bad reasoning (
|Pr[G₀:A] - Pr[G₁:A]| ≤ Pr[G₀:bad]) - Losslessness reasoning: Proving computations never fail
- Query counting: Bounding adversary queries for concrete security bounds
References #
- EasyCrypt:
phoare,byphoare,feltactics - CertiCrypt (Barthe et al.): unary reasoning in Coq
- SSProve (Rocq): only has pRHL (this layer is an extension)