Shamir Secret Sharing #
This module presents a secure-by-construction API for finite-party Shamir secret
sharing through the abstract SecretSharing.Scheme interface.
The public constructors require two pieces of data:
- public parameters consisting of a threshold together with distinct, nonzero evaluation points for a finite party set
- a translation-invariant sampler on the tail coefficients
Translation invariance is exactly the symmetry used in the privacy proof. The canonical finite-field instance is obtained by taking the sampler to be uniform.
Main definitions #
Cslib.Crypto.Protocols.SecretSharing.Shamir.Params: the threshold and public evaluation pointsCslib.Crypto.Protocols.SecretSharing.Shamir.Randomness: the vector of tail coefficientsCslib.Crypto.Protocols.SecretSharing.Shamir.TailSampler: a translation-invariant distribution on tail coefficientsCslib.Crypto.Protocols.SecretSharing.Shamir.schemeWith: Shamir's scheme with a privacy-preserving tail samplerCslib.Crypto.Protocols.SecretSharing.Shamir.scheme: the corresponding finite-field scheme with uniform randomness
Main results #
Cslib.Crypto.Protocols.SecretSharing.Shamir.reconstruct_view_eq_secret: any authorized coalition reconstructs the secretCslib.Crypto.Protocols.SecretSharing.Shamir.authorized_univ: the full party set is always authorized
Notes #
The public share type is just the field F: the evaluation points are fixed in
Params, so one share consists only of the corresponding field value.
References #
Public parameters for a finite Shamir secret-sharing instance. The threshold
is bundled with the evaluation points so the API can enforce the standard
non-vacuous threshold < number of parties side condition.
- threshold : ℕ
A coalition of size
threshold + 1is the first authorized size. Standard Shamir sharing requires
threshold < number of parties.- point : Party → F
The public evaluation point assigned to each party.
- point_injective : Function.Injective self.point
Distinct parties receive distinct evaluation points.
Standard Shamir sharing forbids the point
0, which would reveal the secret directly.
Instances For
The random coefficients of the degree-threshold - 1 tail polynomial.
Equations
- Cslib.Crypto.Protocols.SecretSharing.Shamir.Randomness params = (Fin params.threshold → F)
Instances For
Because params.threshold < |Party|, the full party set can always
reconstruct the secret.
Reconstruct the secret from one coalition's Shamir shares.
Equations
- Cslib.Crypto.Protocols.SecretSharing.Shamir.reconstruct params s σ = Cslib.Crypto.Protocols.SecretSharing.Shamir.Polynomial.reconstruct (fun (i : ↥s) => params.point ↑i) σ
Instances For
A sampler on Shamir tail coefficients is privacy-compatible when its distribution is invariant under translation by any coefficient vector. This is the exact symmetry needed in the privacy proof.
- gen : PMF (Randomness params)
The underlying coefficient distribution.
- map_add_eq_self (δ : Randomness params) : PMF.map (fun (coeffs : Randomness params) => coeffs + δ) self.gen = self.gen
Translating the coefficients does not change the distribution.
Instances For
Uniform tail coefficients form the canonical privacy-compatible sampler.
Equations
- Cslib.Crypto.Protocols.SecretSharing.Shamir.uniformTailSampler params = { gen := PMF.uniformOfFintype (Cslib.Crypto.Protocols.SecretSharing.Shamir.Randomness params), map_add_eq_self := ⋯ }
Instances For
Translation-invariant Shamir tail samplers induce secret-independent views for unauthorized coalitions.
Shamir's scheme built from a privacy-compatible tail sampler.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The canonical finite-field Shamir scheme with uniformly sampled tail coefficients.
Equations
Instances For
Any authorized coalition reconstructs the secret from the shares it sees.