Cslib.Crypto.Protocols.SecretSharing.Scheme
structureimported Lean
A secret-sharing scheme over secret space Secret, randomness space Randomness, party set Party, and share space Share. Correctness is deterministic: every authorized coalition reconstructs the secret from the shares generated using any randomness seed. Privacy is distributional: unauthorized coalitions have the same view distribution for all secrets.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in structure Cslib.Crypto.Protocols.SecretSharing.Scheme (Secret Randomness Party Share : Type*)
- Defined in
- CSLib, `Cslib.Crypto.Protocols.SecretSharing.Scheme`
- Lean proof
- By Samuel Schlesinger, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2026 Samuel Schlesinger. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Cslib.Crypto.Protocols.SecretSharing.Scheme← Cslib.Crypto.Protocols.SecretSharing.Scheme (Cslib/Crypto/Protocols/SecretSharing/Scheme.lean:52): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 1
- Cslib.Crypto.Protocols.SecretSharing.viewDistOfThe view distribution induced by raw sharing data.
- Used by 16
- Cslib.Crypto.Protocols.SecretSharing.Scheme.not_authorized_of_subsetAny sub-coalition of an unauthorized coalition is unauthorized as well.
- Cslib.Crypto.Protocols.SecretSharing.Scheme.PerfectlyPrivatePerfect privacy for unauthorized coalitions: conditioning on a view does not change the prior on secrets.
- Cslib.Crypto.Protocols.SecretSharing.Shamir.schemeWithShamir's scheme built from a privacy-compatible tail sampler.
- Cslib.Crypto.Protocols.SecretSharing.Shamir.schemeWith_authorized_iffCslib.Crypto.Protocols.SecretSharing.Shamir.schemeWith_authorized_iff
- Cslib.Crypto.Protocols.SecretSharing.Scheme.reconstruct_view_eq_secretAuthorized coalitions reconstruct the secret from the restricted view.
- Cslib.Crypto.Protocols.SecretSharing.Scheme.viewDistThe view distribution induced on the coalition
s. - Cslib.Crypto.Protocols.SecretSharing.Shamir.schemeWith_share_eqCslib.Crypto.Protocols.SecretSharing.Shamir.schemeWith_share_eq
- Cslib.Crypto.Protocols.SecretSharing.Scheme.shareDistThe distribution of the full share assignment for one secret.
- Cslib.Crypto.Protocols.SecretSharing.Scheme.posteriorSecretDist_applyCslib.Crypto.Protocols.SecretSharing.Scheme.posteriorSecretDist_apply
- Cslib.Crypto.Protocols.SecretSharing.Shamir.scheme_authorized_iffCslib.Crypto.Protocols.SecretSharing.Shamir.scheme_authorized_iff
- Cslib.Crypto.Protocols.SecretSharing.Scheme.view_applyCslib.Crypto.Protocols.SecretSharing.Scheme.view_apply
- Cslib.Crypto.Protocols.SecretSharing.Shamir.schemeThe canonical finite-field Shamir scheme with uniformly sampled tail coefficients.
- Cslib.Crypto.Protocols.SecretSharing.Scheme.posteriorSecretDistThe posterior distribution on secrets after observing the coalition view
v. - Cslib.Crypto.Protocols.SecretSharing.Shamir.reconstruct_view_eq_secretAny authorized coalition reconstructs the secret from the shares it sees.
- Cslib.Crypto.Protocols.SecretSharing.Scheme.viewThe restricted shares observed by the coalition
s. - Cslib.Crypto.Protocols.SecretSharing.Scheme.viewDist_eq_of_not_authorizedUnauthorized coalitions receive secret-independent view distributions.
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in /-- A secret-sharing scheme over secret space `Secret`, randomness space `Randomness`, party set `Party`, and share space `Share`. Correctness is deterministic: every authorized coalition reconstructs the secret from the shares generated using any randomness seed. Privacy is distributional: unauthorized coalitions have the same view distribution for all secrets. -/ structure Cslib.Crypto.Protocols.SecretSharing.Scheme (Secret Randomness Party Share : Type*) where /-- The distribution used to sample the protocol's randomness. -/ gen : PMF Randomness /-- Sharing algorithm: one randomness seed determines one share per party. -/ share : Randomness → Secret → Party → Share /-- Reconstruction from a coalition's observed shares. -/ reconstruct (s : Finset Party) : (s → Share) → Secret /-- Authorized coalitions. -/ authorized : Finset Party → Prop /-- Authorization is monotone in the coalition. -/ authorized_mono : ∀ {s t : Finset Party}, s ⊆ t → authorized s → authorized t /-- Authorized coalitions reconstruct the secret from the restricted view. -/ correct : ∀ (r : Randomness) (secret : Secret) (s : Finset Party), authorized s → reconstruct s (fun i => share r secret i) = secret /-- Unauthorized coalitions receive secret-independent view distributions. -/ view_indist : ∀ (s : Finset Party), ¬ authorized s → ∀ secret₀ secret₁ : Secret, viewDistOf gen share s secret₀ = viewDistOf gen share s secret₁