Documentation

CslibFrontier.Crypto.Protocols.SecretSharing.AccessStructure.Shamir

Shamir Threshold Secret Sharing as an Access-Structure Instance #

This module instantiates Cslib.Crypto.Protocols.SecretSharing.AccessScheme for Shamir secret sharing over a field F, using the linear reconstruction lemma Shamir.reconstruct_share_eq_secret and unauthorized marginal uniformity lemma Shamir.uniformOfFintype_map_restrict_share from CslibFrontier/Crypto/Protocols/SecretSharing/Shamir/Linear.lean ([Sha79]; [KL20]).

It provides:

  1. shamirAccessStructure: the (params.threshold + 1)-threshold access structure.
  2. shamirAccessScheme: Shamir sharing over the class of all translation-invariant tail-coefficient distributions SourceClass.translationInvariant (Shamir.Randomness params). When F is finite, this source class consists solely of {uniformOfFintype}, whereas when F is infinite and params.threshold ≥ 1, no translation-invariant PMF on Fin params.threshold → F exists (SourceClass.translationInvariant (Shamir.Randomness params) = ∅), so shamirAccessScheme has vacuous privacy over infinite fields (while universal correctness still holds for all keys).
  3. shamirUniformAccessScheme: canonical finite-field Shamir sharing over the uniform tail distribution, together with shamirUniform_viewDist_eq (marginal uniformity) and shamirUniform_mutualInfo_eq_zero (vanishing mutual information).
  4. shamirPaddedSources, shamirPaddedAccessScheme: auxiliary-key padding of shamirAccessScheme via comapKey Prod.fst, pairing Randomness params with an arbitrary ignored component Aux (not an imperfect-randomness construction in [Agg26]'s sense).
  5. shamirToTwoTwo: (2, 2)-threshold sharing derived from Shamir (1 ≤ params.threshold) via design composition (ThresholdDesignOn.toTwoTwo, [Agg26], Section 5; [ACOR22] attribution unverified directly).

Main definitions #

Main results #

References #

def Cslib.Crypto.Protocols.SecretSharing.shamirAccessStructure {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) :

The threshold access structure of Shamir secret sharing: coalitions of size at least params.threshold + 1 are authorized.

@[simp]
noncomputable def Cslib.Crypto.Protocols.SecretSharing.shamirAccessSchemeOf {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) (sources : SourceClass (Shamir.Randomness params)) (hsources : sources ⊆ SourceClass.translationInvariant (Shamir.Randomness params)) :
AccessScheme F (Shamir.Randomness params) Party fun (x : Party) => F

Shamir threshold secret sharing over any subclass of translation-invariant tail samplers.

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.shamirAccessSchemeOf_access {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) (sources : SourceClass (Shamir.Randomness params)) (hsources : sources ⊆ SourceClass.translationInvariant (Shamir.Randomness params)) :
(shamirAccessSchemeOf params sources hsources).access = shamirAccessStructure params
noncomputable def Cslib.Crypto.Protocols.SecretSharing.shamirAccessScheme {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) :
AccessScheme F (Shamir.Randomness params) Party fun (x : Party) => F

Shamir secret sharing over SourceClass.translationInvariant (Shamir.Randomness params). Note that for infinite fields F with params.threshold ≥ 1, this source class is empty, so privacy is vacuous and only universal correctness is nontrivial; use shamirUniformAccessScheme for finite fields.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.shamirUniformAccessScheme {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) [Fintype F] [Nonempty F] :
AccessScheme F (Shamir.Randomness params) Party fun (x : Party) => F

Canonical finite-field Shamir secret sharing over the singleton uniform tail source.

Under uniform Shamir randomness, any unauthorized coalition's view distribution is uniform on s → F (via Shamir.uniformOfFintype_map_restrict_share).

Under uniform Shamir randomness, any unauthorized coalition's view has zero mutual information with the secret.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.shamirPaddedSources {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) (Aux : Type u_3) :

Auxiliary-key-padded sources for Shamir sharing: pairs (r, aux) whose tail-coefficient marginal P.map Prod.fst is translation-invariant (uniform when F is finite), paired with unused auxiliary material aux that the scheme ignores.

theorem Cslib.Crypto.Protocols.SecretSharing.bind_mem_shamirPaddedSources {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] {params : Shamir.Params F Party} {Aux : Type u_3} {P : PMF (Shamir.Randomness params)} (hP : P ∈ SourceClass.translationInvariant (Shamir.Randomness params)) (Q : Shamir.Randomness params → PMF Aux) :
(P.bind fun (r : Shamir.Randomness params) => PMF.map (fun (x : Aux) => (r, x)) (Q r)) ∈ shamirPaddedSources params Aux

Any correlated auxiliary distribution paired with a translation-invariant tail source lies in shamirPaddedSources.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.shamirPaddedAccessScheme {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) (Aux : Type u_3) :
AccessScheme F (Shamir.Randomness params × Aux) Party fun (x : Party) => F

Auxiliary-key padding of shamirAccessScheme onto Randomness params × Aux via comapKey Prod.fst (ignoring the auxiliary component Aux; not an imperfect-randomness construction in [Agg26]'s sense).

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.shamirPaddedAccessScheme_access {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] (params : Shamir.Params F Party) (Aux : Type u_3) :
noncomputable def Cslib.Crypto.Protocols.SecretSharing.shamirToTwoTwo {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] [DecidableEq Party] (params : Shamir.Params F Party) (ht : 1 ≤ params.threshold) :
AccessScheme F (Shamir.Randomness params) (Fin 2) fun (i : Fin 2) => ↥((⋯ ▸ ThresholdDesignOn.toTwoTwo Party ⋯ ⋯).assign i) → F

(t', n') → (2, 2) distribution-design reduction applied to Shamir secret sharing whenever 1 ≤ params.threshold ([Agg26], Section 5; [ACOR22] attribution unverified directly).

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.shamirToTwoTwo_access {F : Type u_1} {Party : Type u_2} [Field F] [Fintype Party] [DecidableEq Party] (params : Shamir.Params F Party) (ht : 1 ≤ params.threshold) :