Documentation

CslibFrontier.Crypto.Protocols.SecretSharing.AccessStructure.Designs

Distribution Designs and Random-less Composition #

This module formalizes distribution designs and random-less composition of secret-sharing schemes. In the literature, threshold distribution designs and (t', n') → (2, 2) reductions are due to Aggarwal, Chung, Obremski, and Ribeiro ([ACOR22], unverified directly because the ePrint copy is gated behind an automated challenge) as presented in [Agg26], Section 5 ("Relation to the reductions of ACOR22"):

  1. General distribution designs (DistributionDesign): an original generalization of the threshold notion in [Agg26], Section 5 to general monotone access structures: an assignment assign : Party → Finset Party' handing each new party the shares of a set of old parties so that a coalition s is authorized in A iff s.biUnion assign is authorized in A' (equivalently A'.pullback assign = A).
  2. Random-less composition (AccessScheme.composeDesign, StatisticallyPrivate.composeDesign): composing any scheme over A' with a DistributionDesign A A' yields a scheme over A with the same key type and source class sources, preserving universal correctness, perfect privacy, and statistical δ-privacy ([Agg26], Section 5, threshold case generalized here to AccessScheme).
  3. Threshold (t, n, t', n')-designs (ThresholdDesignOn, ThresholdDesign):

Main definitions #

Main results #

References #

structure Cslib.Crypto.Protocols.SecretSharing.DistributionDesign {Party : Type u_1} {Party' : Type u_2} (A : AccessStructure Party) (A' : AccessStructure Party') [DecidableEq Party'] :
Type (max u_1 u_2)

A distribution design from A' (over Party') to A (over Party) assigns each party i : Party a finite subset assign i of Party' such that a coalition s is authorized in A iff the union s.biUnion assign is authorized in A' (an original generalization to general monotone access structures of the threshold design notion in [Agg26], Section 5; [ACOR22] attribution unverified directly).

  • assign : Party → Finset Party'

    Old parties whose shares are handed to each new party i.

  • authorized_iff (s : Finset Party) : A.authorized s ↔ A'.authorized (s.biUnion self.assign)

    Equivalence of authorization between A and the pulled-back coalitions in A'.

def Cslib.Crypto.Protocols.SecretSharing.DistributionDesign.ofPullback {Party : Type u_1} {Party' : Type u_2} [DecidableEq Party'] (assign : Party → Finset Party') (A' : AccessStructure Party') :

Any access structure pulled back along assign yields a canonical distribution design.

A distribution design exhibits A as the pullback of A' along d.assign.

The identity distribution design handing each party its own single share.

def Cslib.Crypto.Protocols.SecretSharing.DistributionDesign.comp {Party₁ : Type u_1} {Party₂ : Type u_2} {Party₃ : Type u_3} [DecidableEq Party₂] [DecidableEq Party₃] {A₁ : AccessStructure Party₁} {A₂ : AccessStructure Party₂} {A₃ : AccessStructure Party₃} (d₁ : DistributionDesign A₁ A₂) (d₂ : DistributionDesign A₂ A₃) :

Sequential composition of distribution designs: composing d₁ : A₁ ← A₂ with d₂ : A₂ ← A₃ assigns i the union (d₁.assign i).biUnion d₂.assign.

def Cslib.Crypto.Protocols.SecretSharing.DistributionDesign.projectView {Party : Type u_1} {Party' : Type u_2} {Share' : Party' → Type u_3} [DecidableEq Party'] (assign : Party → Finset Party') (s : Finset Party) (v' : (j : ↥(s.biUnion assign)) → Share' ↑j) (i : ↥s) (j : ↥(assign ↑i)) :
Share' ↑j

Reinterpret a coalition view on s.biUnion assign as the composed view on s.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.AccessScheme.composeDesign {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Party' : Type u_4} {Share' : Party' → Type u_5} (scheme' : AccessScheme Secret Key Party' Share') {A : AccessStructure Party} [DecidableEq Party'] (d : DistributionDesign A scheme'.access) :
AccessScheme Secret Key Party fun (i : Party) => (j : ↥(d.assign i)) → Share' ↑j

Random-less composition of an AccessScheme along a DistributionDesign: each party i receives the tuple of shares of d.assign i, keeping the exact same Key type and sources class (checked for threshold designs in [Agg26], Section 5 and generalized here to arbitrary AccessScheme; [ACOR22] attribution unverified directly).

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.composeDesign_sources {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Party' : Type u_4} {Share' : Party' → Type u_5} (scheme' : AccessScheme Secret Key Party' Share') {A : AccessStructure Party} [DecidableEq Party'] (d : DistributionDesign A scheme'.access) :
(scheme'.composeDesign d).sources = scheme'.sources
@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.composeDesign_access {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Party' : Type u_4} {Share' : Party' → Type u_5} (scheme' : AccessScheme Secret Key Party' Share') {A : AccessStructure Party} [DecidableEq Party'] (d : DistributionDesign A scheme'.access) :
(scheme'.composeDesign d).access = A
theorem Cslib.Crypto.Protocols.SecretSharing.StatisticallyPrivate.composeDesign {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Party' : Type u_4} {Share' : Party' → Type u_5} [(j : Party') → Fintype (Share' j)] [DecidableEq Party] [DecidableEq Party'] {A : AccessStructure Party} {A' : AccessStructure Party'} {sources : SourceClass Key} {share' : Key → Secret → (j : Party') → Share' j} {δ : NNReal} (d : DistributionDesign A A') (h : StatisticallyPrivate A' sources share' δ) :
StatisticallyPrivate A sources (fun (k : Key) (secret : Secret) (i : Party) (j : ↥(d.assign i)) => share' k secret ↑j) δ

Composing a δ-statistically private sharing map with a distribution design preserves δ-statistical privacy over the exact same source class.

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.SecretSharing.ThresholdDesignOn (Party : Type u_1) (Party' : Type u_2) [DecidableEq Party'] (t t' : ℕ) :
Type (max u_1 u_2)

A threshold distribution design converting a t'-threshold scheme over Party' to a t-threshold scheme over Party (generalizing finite-party threshold designs in [Agg26], Section 5).

@[reducible, inline]

A (t, n, t', n')-distribution design ([Agg26], Section 5; [ACOR22] attribution unverified directly).

def Cslib.Crypto.Protocols.SecretSharing.ThresholdDesignOn.ofCardEq {Party : Type u_1} {Party' : Type u_2} [Fintype Party] [DecidableEq Party'] {t t' : ℕ} (ht : 0 < t) (htn : t ≤ Fintype.card Party) (assign : Party → Finset Party') (hauth : ∀ (s : Finset Party), s.card = t → t' ≤ (s.biUnion assign).card) (hunauth : ∀ (s : Finset Party), s.card = t - 1 → (s.biUnion assign).card < t') :
ThresholdDesignOn Party Party' t t'

Construct a threshold distribution design from the exact-size conditions: every t-element coalition covers at least t' old parties and every (t - 1)-element coalition covers strictly fewer than t' old parties (assuming 0 < t and t ≤ Fintype.card Party).

theorem Cslib.Crypto.Protocols.SecretSharing.ThresholdDesignOn.le_card_of_card_eq {Party : Type u_1} {Party' : Type u_2} [DecidableEq Party'] {t t' : ℕ} (d : ThresholdDesignOn Party Party' t t') {s : Finset Party} (hs : s.card = t) :
theorem Cslib.Crypto.Protocols.SecretSharing.ThresholdDesignOn.card_lt_of_card_eq_sub_one {Party : Type u_1} {Party' : Type u_2} [DecidableEq Party'] {t t' : ℕ} (d : ThresholdDesignOn Party Party' t t') (ht : 0 < t) {s : Finset Party} (hs : s.card = t - 1) :
(s.biUnion d.assign).card < t'
def Cslib.Crypto.Protocols.SecretSharing.ThresholdDesignOn.ofSubset {Party' : Type u_1} [DecidableEq Party'] {t' : ℕ} (U : Finset Party') (p₀ : Party') (ht' : 2 ≤ t') (hU : U.card = t') (hp₀ : p₀ ∈ U) :
ThresholdDesignOn (Fin 2) Party' 2 t'

Explicit (2, 2, t', |Party'|)-distribution design built from any t'-element subset U : Finset Party' (2 ≤ t') and a distinguished member p₀ ∈ U: party 0 receives U.erase p₀ and party 1 receives {p₀} ([Agg26], Section 5).

noncomputable def Cslib.Crypto.Protocols.SecretSharing.ThresholdDesignOn.toTwoTwo (Party' : Type u_1) [Fintype Party'] [DecidableEq Party'] {t' : ℕ} (ht' : 2 ≤ t') (htn' : t' ≤ Fintype.card Party') :
ThresholdDesignOn (Fin 2) Party' 2 t'

Explicit (2, 2, t', |Party'|)-distribution design for any finite party type Party' with 2 ≤ t' ≤ |Party'| ([Agg26], Section 5; [ACOR22] attribution unverified directly).

def Cslib.Crypto.Protocols.SecretSharing.ThresholdDesign.toTwoTwo {t' n' : ℕ} (ht' : 2 ≤ t') (htn' : t' ≤ n') :
ThresholdDesign 2 2 t' n'

Explicit computable (2, 2, t', n')-distribution design for 2 ≤ t' ≤ n' ([Agg26], Section 5; [ACOR22] attribution unverified directly): party 0 receives old shares {0, ..., t' - 2} and party 1 receives {t' - 1}.

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.ThresholdDesign.toTwoTwo_assign_one {t' n' : ℕ} (ht' : 2 ≤ t') (htn' : t' ≤ n') :
(toTwoTwo ht' htn').assign 1 = {⟨t' - 1, ⋯⟩}
noncomputable def Cslib.Crypto.Protocols.SecretSharing.AccessScheme.toTwoTwo {Secret : Type u_1} {Key : Type u_2} {Party' : Type u_3} {Share' : Party' → Type u_4} [Fintype Party'] [DecidableEq Party'] {t' : ℕ} (scheme' : AccessScheme Secret Key Party' Share') (haccess : scheme'.access = AccessStructure.threshold Party' t') (ht' : 2 ≤ t') (htn' : t' ≤ Fintype.card Party') :
AccessScheme Secret Key (Fin 2) fun (i : Fin 2) => (j : ↥((⋯ ▸ ThresholdDesignOn.toTwoTwo Party' ht' htn').assign i)) → Share' ↑j

Convert any t'-threshold AccessScheme over a finite Party' (2 ≤ t' ≤ |Party'|) into a (2, 2)-threshold AccessScheme over Fin 2 with the exact same Key type and sources class ([Agg26], Section 5; [ACOR22] attribution unverified directly).

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.toTwoTwo_access {Secret : Type u_1} {Key : Type u_2} {Party' : Type u_3} {Share' : Party' → Type u_4} [Fintype Party'] [DecidableEq Party'] {t' : ℕ} (scheme' : AccessScheme Secret Key Party' Share') (haccess : scheme'.access = AccessStructure.threshold Party' t') (ht' : 2 ≤ t') (htn' : t' ≤ Fintype.card Party') :
(scheme'.toTwoTwo haccess ht' htn').access = AccessStructure.threshold (Fin 2) 2
@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.toTwoTwo_sources {Secret : Type u_1} {Key : Type u_2} {Party' : Type u_3} {Share' : Party' → Type u_4} [Fintype Party'] [DecidableEq Party'] {t' : ℕ} (scheme' : AccessScheme Secret Key Party' Share') (haccess : scheme'.access = AccessStructure.threshold Party' t') (ht' : 2 ≤ t') (htn' : t' ≤ Fintype.card Party') :
(scheme'.toTwoTwo haccess ht' htn').sources = scheme'.sources
theorem Cslib.Crypto.Protocols.SecretSharing.no_thresholdDesign_two_two {t n : ℕ} (ht : 2 ≤ t) (htn : t ≤ n) (hn : 3 ≤ n) :

Non-existence of (t, n, 2, 2) distribution designs whenever 2 ≤ t ≤ n and 3 ≤ n: an original generalization of the (2, 3, 2, 2) and (r, r, 2, 2) (r ≥ 3) non-existence results stated in [Agg26], Section 5 ([ACOR22] attribution unverified directly).

No (2, 3, 2, 2) distribution design exists ([Agg26], Section 5; [ACOR22] attribution unverified directly).

No (r, r, 2, 2) distribution design exists for r ≥ 3 ([Agg26], Section 5; [ACOR22] attribution unverified directly).