Documentation

CslibFrontier.Crypto.Protocols.SecretSharing.AccessStructure.Privacy

Privacy Notions and Information-Theoretic Characterizations for Access Structures #

This module complements CslibFrontier/Crypto/Protocols/SecretSharing/AccessStructure/Basic.lean with unbundled correctness and privacy predicates over general monotone access structures and source classes, statistical δ-privacy ([Agg26], Definition 2.1), posterior privacy ([KL20]), and Shannon mutual-information / conditional-entropy characterizations ([CT06], Sections 2.4–2.5).

Main definitions #

Main results #

References #

def Cslib.Crypto.Protocols.SecretSharing.PerfectlyCorrect {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (access : AccessStructure Party) (share : Key → Secret → (i : Party) → Share i) (reconstruct : (s : Finset Party) → ((i : ↥s) → Share ↑i) → Secret) :

Deterministic universal correctness: every authorized coalition reconstructs secret for every ambient key k.

def Cslib.Crypto.Protocols.SecretSharing.ViewIndist {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (access : AccessStructure Party) (sources : SourceClass Key) (share : Key → Secret → (i : Party) → Share i) :

Perfect view-indistinguishability privacy relative to source class sources: under every source P ∈ sources and every unauthorized coalition s, any two secrets induce identical view distributions.

def Cslib.Crypto.Protocols.SecretSharing.StatisticallyPrivate {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [DecidableEq Party] [(i : Party) → Fintype (Share i)] (access : AccessStructure Party) (sources : SourceClass Key) (share : Key → Secret → (i : Party) → Share i) (δ : NNReal) :

Statistical δ-privacy relative to source class sources (generalizing [Agg26], Definition 2.1 from threshold structures and finite key spaces to general monotone access structures and arbitrary Key): under every source P ∈ sources and every unauthorized coalition s, the views of any two secrets have statistical distance at most δ.

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.statisticallyPrivate_zero_iff {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [DecidableEq Party] [(i : Party) → Fintype (Share i)] (access : AccessStructure Party) (sources : SourceClass Key) (share : Key → Secret → (i : Party) → Share i) :
StatisticallyPrivate access sources share 0 ↔ ViewIndist access sources share

Statistical 0-privacy is equivalent to exact view indistinguishability.

theorem Cslib.Crypto.Protocols.SecretSharing.StatisticallyPrivate.mono {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [DecidableEq Party] [(i : Party) → Fintype (Share i)] {access : AccessStructure Party} {sources : SourceClass Key} {share : Key → Secret → (i : Party) → Share i} {δ δ' : NNReal} (hδ : δ ≤ δ') (h : StatisticallyPrivate access sources share δ) :
StatisticallyPrivate access sources share δ'

Statistical privacy is monotone in the error tolerance δ.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.perfectlyCorrect {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (scheme : AccessScheme Secret Key Party Share) :

Every AccessScheme satisfies PerfectlyCorrect.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.viewIndist {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (scheme : AccessScheme Secret Key Party Share) :
ViewIndist scheme.access scheme.sources scheme.share

Every AccessScheme satisfies ViewIndist.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.statisticallyPrivate_zero {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [DecidableEq Party] [(i : Party) → Fintype (Share i)] (scheme : AccessScheme Secret Key Party Share) :
StatisticallyPrivate scheme.access scheme.sources scheme.share 0

Every AccessScheme is statistically 0-private.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.statisticallyPrivate {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [DecidableEq Party] [(i : Party) → Fintype (Share i)] (scheme : AccessScheme Secret Key Party Share) (δ : NNReal) :
StatisticallyPrivate scheme.access scheme.sources scheme.share δ

Every AccessScheme is statistically δ-private for every δ : ℝ≥0.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.posteriorSecretDistOf {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (P : PMF Key) (share : Key → Secret → (i : Party) → Share i) (s : Finset Party) (secretDist : PMF Secret) (v : (i : ↥s) → Share ↑i) (hv : v ∈ (secretDist.bind (AccessStructure.viewDistOf P share s)).support) :
PMF Secret

Posterior distribution on secrets given an observed coalition view v under source P and prior secretDist.

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.posteriorSecretDistOf_apply {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (P : PMF Key) (share : Key → Secret → (i : Party) → Share i) (s : Finset Party) (secretDist : PMF Secret) (v : (i : ↥s) → Share ↑i) (hv : v ∈ (secretDist.bind (AccessStructure.viewDistOf P share s)).support) (secret : Secret) :
(posteriorSecretDistOf P share s secretDist v hv) secret = (secretDist.bind fun (secret' : Secret) => (AccessStructure.viewDistOf P share s secret').bind fun (v' : (i : ↥s) → Share ↑i) => PMF.pure (secret', v')) (secret, v) / (secretDist.bind (AccessStructure.viewDistOf P share s)) v
def Cslib.Crypto.Protocols.SecretSharing.PosteriorPrivate {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (access : AccessStructure Party) (sources : SourceClass Key) (share : Key → Secret → (i : Party) → Share i) :

Posterior privacy: under every source P ∈ sources and unauthorized coalition s, conditioning on any positive-probability view leaves every secret prior unchanged.

theorem Cslib.Crypto.Protocols.SecretSharing.posteriorPrivate_iff_viewIndist {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (access : AccessStructure Party) (sources : SourceClass Key) (share : Key → Secret → (i : Party) → Share i) :
PosteriorPrivate access sources share ↔ ViewIndist access sources share

Posterior privacy is equivalent to view indistinguishability.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.AccessScheme.posteriorSecretDist {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (scheme : AccessScheme Secret Key Party Share) (P : PMF Key) (s : Finset Party) (secretDist : PMF Secret) (v : (i : ↥s) → Share ↑i) (hv : v ∈ (secretDist.bind (scheme.viewDist P s)).support) :
PMF Secret

The posterior distribution on secrets given an observed view of an AccessScheme.

def Cslib.Crypto.Protocols.SecretSharing.AccessScheme.PerfectlyPrivate {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (scheme : AccessScheme Secret Key Party Share) :

Perfect posterior privacy for an AccessScheme: conditioning on any unauthorized coalition view leaves every prior on secrets unchanged.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.perfectlyPrivate {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (scheme : AccessScheme Secret Key Party Share) :

Every AccessScheme has posterior privacy.

noncomputable def Cslib.Crypto.Protocols.SecretSharing.jointSecretView {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (P : PMF Key) (share : Key → Secret → (i : Party) → Share i) (s : Finset Party) (secretDist : PMF Secret) :
PMF (Secret × ((i : ↥s) → Share ↑i))

The joint distribution of a secret drawn from secretDist paired with coalition s's view under key source P.

@[simp]
theorem Cslib.Crypto.Protocols.SecretSharing.map_fst_jointSecretView {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} (P : PMF Key) (share : Key → Secret → (i : Party) → Share i) (s : Finset Party) (secretDist : PMF Secret) :
PMF.map Prod.fst (jointSecretView P share s secretDist) = secretDist
theorem Cslib.Crypto.Protocols.SecretSharing.mutualInfo_jointSecretView_eq_zero_of_viewIndist {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [Finite Secret] [∀ (i : Party), Finite (Share i)] {access : AccessStructure Party} {sources : SourceClass Key} {share : Key → Secret → (i : Party) → Share i} (h : ViewIndist access sources share) {P : PMF Key} (hP : P ∈ sources) {s : Finset Party} (hs : ¬access.authorized s) (secretDist : PMF Secret) :

Under ViewIndist, every secret prior has zero mutual information with any unauthorized coalition's view.

theorem Cslib.Crypto.Protocols.SecretSharing.mutualInfo_eq_zero_iff_viewIndist {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [Finite Secret] [∀ (i : Party), Finite (Share i)] (access : AccessStructure Party) (sources : SourceClass Key) (share : Key → Secret → (i : Party) → Share i) :
(∀ P ∈ sources, ∀ (s : Finset Party), ¬access.authorized s → ∀ (secretDist : PMF Secret), Probability.PMF.mutualInfo (jointSecretView P share s secretDist) = 0) ↔ ViewIndist access sources share

Vanishing mutual information across all secret priors is equivalent to ViewIndist.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.mutualInfo_view_eq_zero {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [Finite Secret] [∀ (i : Party), Finite (Share i)] (scheme : AccessScheme Secret Key Party Share) {P : PMF Key} (hP : P ∈ scheme.sources) {s : Finset Party} (hs : ¬scheme.access.authorized s) (secretDist : PMF Secret) :

For an AccessScheme, any unauthorized coalition has zero mutual information with the secret under every source in sources.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.conditionalEntropy_secret_given_view_eq_zero {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [Finite Secret] [∀ (i : Party), Finite (Share i)] (scheme : AccessScheme Secret Key Party Share) (P : PMF Key) {s : Finset Party} (hs : scheme.access.authorized s) (secretDist : PMF Secret) :

For an AccessScheme, any authorized coalition leaves zero conditional entropy in the secret given its view.

theorem Cslib.Crypto.Protocols.SecretSharing.AccessScheme.mutualInfo_authorized_eq_entropy {Secret : Type u_1} {Key : Type u_2} {Party : Type u_3} {Share : Party → Type u_4} [Finite Secret] [∀ (i : Party), Finite (Share i)] (scheme : AccessScheme Secret Key Party Share) (P : PMF Key) {s : Finset Party} (hs : scheme.access.authorized s) (secretDist : PMF Secret) :

For an AccessScheme, any authorized coalition's view has mutual information equal to the full Shannon entropy of the secret prior.