Perfect Secrecy At of uniform Key of unique Key
SymmEncAlg.perfectSecrecyAt_of_uniformKey_of_uniqueKey
Plain-language statement
Constructive Shannon direction: if keygen is uniform and each (message, ciphertext) pair is realized by a unique key in support, then perfect secrecy holds. deterministicEnc asserts encryption is deterministic in distribution (singleton support for each fixed (key, message)).
Exact Lean statement
theorem perfectSecrecyAt_of_uniformKey_of_uniqueKey [LawfulMonad m]
(encAlg : SymmEncAlg m M K C)
[Fintype K]
(deterministicEnc : ∀ (k : K) (msg : M),
∃ c, support (encAlg.encrypt k msg) = {c}) :
((∀ k : K, Pr[= k | encAlg.keygen] =
(Fintype.card K : ℝ≥0∞)⁻¹) ∧
(∀ msg : M, ∀ c : C, ∃! k : K,
k ∈ support encAlg.keygen ∧
c ∈ support (encAlg.encrypt k msg))) →
encAlg.perfectSecrecyAtFormal artifact
Lean source
theorem perfectSecrecyAt_of_uniformKey_of_uniqueKey [LawfulMonad m] (encAlg : SymmEncAlg m M K C) [Fintype K] (deterministicEnc : ∀ (k : K) (msg : M), ∃ c, support (encAlg.encrypt k msg) = {c}) : ((∀ k : K, Pr[= k | encAlg.keygen] = (Fintype.card K : ℝ≥0∞)⁻¹) ∧ (∀ msg : M, ∀ c : C, ∃! k : K, k ∈ support encAlg.keygen ∧ c ∈ support (encAlg.encrypt k msg))) → encAlg.perfectSecrecyAt := by intro ⟨hKeyUniform, hUniqueKey⟩ have hCipherGiven_uniform := encAlg.cipherGivenMsg_uniform_of_uniformKey_of_uniqueKey deterministicEnc hKeyUniform hUniqueKey have hCipher_uniform : ∀ (mgen : m M) (σ : C), Pr[= σ | encAlg.PerfectSecrecyCipherExp mgen] = (Fintype.card K : ℝ≥0∞)⁻¹ := by intro mgen σ rw [encAlg.probOutput_PerfectSecrecyCipherExp_eq_tsum mgen σ] simp_rw [hCipherGiven_uniform _ σ, ENNReal.tsum_mul_right, tsum_probOutput_of_liftM_PMF mgen, one_mul] intro mgen msg σ rw [encAlg.probOutput_PerfectSecrecyExp_eq_mul_cipherGivenMsg mgen msg σ, hCipherGiven_uniform msg σ, hCipher_uniform mgen σ]- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/CryptoFoundations/SymmEncAlg.lean:221-243
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Expected Cost Nat eq sum tail probs of pathwise Cost At Most
AddWriterT.expectedCostNat_eq_sum_tail_probs_of_pathwiseCostAtMost
Plain-language statement
Finite tail-sum formula for natural-valued writer cost under a pathwise upper bound. If every execution path of oa incurs cost at most n, then the tail probabilities vanish above n, so the infinite tail sum truncates to Finset.range n.
Source project: VCVio
Person-level attribution pending.
IND CPA advantage to Real le sum step signed Advantage Real abs
AsymmEncAlg.IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs
Plain-language statement
Planned generic one-time-to-many-time lift: bounded multi-query IND-CPA advantage is at most the sum of the extracted one-time signed advantages over the first q fresh LR queries.
Source project: VCVio
Person-level attribution pending.
IND CPA LR hybrid Game q eval Dist eq left of Makes At Most Queries
AsymmEncAlg.IND_CPA_LR_hybridGame_q_evalDist_eq_left_of_MakesAtMostQueries
Plain-language statement
If an adversary makes at most q fresh LR queries, then the leftUntil = q LR-hybrid is the all-left endpoint game.
Source project: VCVio
Person-level attribution pending.