AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
none listed
Built on 1
Used by 16

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₁
See it in the graphDiscuss this resultChallenge it