Documentation

CslibFrontier.Crypto.Protocols.KEM.FujisakiOkamoto.Correctness

Shared correctness facts for Fujisaki--Okamoto transforms #

This module contains the PKE-level facts shared by the unsalted and salted FO correctness hops. A coin cache is good when every cached honest encryption decrypts to its cached message. ExplicitCoinPKE.advantage_bind_keyGen_le is the common key-mixture rule: fixed-key CloseTo bounds proportional to the worst-message failure probability average to the exact loss * δ two-world advantage bound under ExplicitCoinPKE.DeltaCorrect δ.

Main definitions #

Main results #

def Cslib.Crypto.Protocols.ExplicitCoinPKE.GoodCache {PK SK M R CT : Type} (P : ExplicitCoinPKE PK SK M R CT) (pk : PK) (sk : SK) (cache : List (M × R)) :

Every cached message/coin pair decrypts correctly for a fixed PKE key pair.

theorem Cslib.Crypto.Protocols.ExplicitCoinPKE.GoodCache.of_subset {PK SK M R CT : Type} {P : ExplicitCoinPKE PK SK M R CT} {pk : PK} {sk : SK} {cache cache' : List (M × R)} (h : P.GoodCache pk sk cache') (hsub : ∀ e ∈ cache, e ∈ cache') :
P.GoodCache pk sk cache

A subcache of a good cache is good.

theorem Cslib.Crypto.Protocols.ExplicitCoinPKE.advantage_bind_keyGen_le {PK SK M R CT : Type} [Fintype M] [Nonempty M] (P : ExplicitCoinPKE PK SK M R CT) (real simulated : PK → SK → PMF Bool) (loss : ℕ) (hclose : ∀ (pk : PK) (sk : SK), Probability.CloseTo (real pk sk) (simulated pk sk) (↑loss * ENNReal.ofReal (P.keyPairMaxFailProb pk sk))) {δ : ℝ} (hδ : P.DeltaCorrect δ) :
↑(Game.advantage (P.keyGen.eval.bind fun (keys : PK × SK) => real keys.1 keys.2) (P.keyGen.eval.bind fun (keys : PK × SK) => simulated keys.1 keys.2)) ≤ ↑loss * δ

Average a fixed-key FO correctness hop over PKE key generation. If fixed-key real and simulated games are within loss times that key pair's worst-message failure probability, then DeltaCorrect δ bounds their key-averaged two-world advantage by loss * δ.