Documentation

CslibFrontier.Crypto.Protocols.PIR.Collusion

Coalition-private information retrieval and full-coalition lower bounds #

Chor, Goldreich, Kushilevitz and Sudan, Section 2.2, pp. 4–5 extends one-round private information retrieval from single curious servers to coalitions of up to t colluding servers: for every coalition of at most t servers, the joint distribution of the queries sent to those servers does not depend on the target index i.

Polynomial Shamir t-private constructions live in PIR.Shamir, single-server specializations in PIR.SingleServer, and block-retrieval transformations in PIR.Block.

Main definitions #

Main results #

References #

def Cslib.Crypto.Protocols.PIR.Scheme.coalitionQuery {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (T : Finset S) (i : ι) :
ProbComp (↥T → Q)

The joint query marginal seen by a coalition T : Finset S when the user queries i.

def Cslib.Crypto.Protocols.PIR.Scheme.tupleQuery {ι S R Q A β : Type} (P : Scheme ι S R Q A β) {τ : Type} (servers : τ → S) (i : ι) :
ProbComp (τ → Q)

The joint query marginal seen by an indexed tuple servers : τ → S of servers CGKS, Section 2.2.

def Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (t : ℕ) :

Perfect t-privacy CGKS, Section 2.2: every coalition of at most t servers sees the same joint query distribution regardless of the target index.

theorem Cslib.Crypto.Protocols.PIR.Scheme.coalitionQuery_eq {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (T : Finset S) (i : ι) :
P.coalitionQuery T i = (fun (x : R × (S → Q)) (s : ↥T) => match x with | (fst, q) => q ↑s) <$> P.query i
theorem Cslib.Crypto.Protocols.PIR.Scheme.eval_coalitionQuery {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (T : Finset S) (i : ι) :
(P.coalitionQuery T i).eval = PMF.map (fun (x : R × (S → Q)) (s : ↥T) => match x with | (fst, q) => q ↑s) (P.query i).eval
theorem Cslib.Crypto.Protocols.PIR.Scheme.eval_tupleQuery {ι S R Q A β : Type} (P : Scheme ι S R Q A β) {τ : Type} (servers : τ → S) (i : ι) :
(P.tupleQuery servers i).eval = PMF.map (fun (x : R × (S → Q)) (j : τ) => match x with | (fst, q) => q (servers j)) (P.query i).eval
theorem Cslib.Crypto.Protocols.PIR.Scheme.isTPrivate_iff {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (t : ℕ) :
P.IsTPrivate t ↔ ∀ (T : Finset S), T.card ≤ t → ∀ (i i' : ι), (P.coalitionQuery T i).eval = (P.coalitionQuery T i').eval
theorem Cslib.Crypto.Protocols.PIR.Scheme.isTPrivate_zero {ι S R Q A β : Type} (P : Scheme ι S R Q A β) :

Every scheme is 0-private: the empty coalition sees the unique empty tuple.

theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.eval_coalitionQuery_eq {ι S R Q A β : Type} {P : Scheme ι S R Q A β} {t : ℕ} (h : P.IsTPrivate t) (T : Finset S) (hT : T.card ≤ t) (i i' : ι) :
theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.mono {ι S R Q A β : Type} {P : Scheme ι S R Q A β} {t₁ t₂ : ℕ} (hle : t₁ ≤ t₂) (h : P.IsTPrivate t₂) :
P.IsTPrivate t₁
theorem Cslib.Crypto.Protocols.PIR.Scheme.isTPrivate_one_iff {ι S R Q A β : Type} {P : Scheme ι S R Q A β} :

1-privacy is exactly single-server IsPrivate.

theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.isPrivate {ι S R Q A β : Type} {P : Scheme ι S R Q A β} {t : ℕ} (ht : 1 ≤ t) (h : P.IsTPrivate t) :
theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.eval_tupleQuery_eq {ι S R Q A β : Type} {P : Scheme ι S R Q A β} {τ : Type} [Fintype τ] {t : ℕ} (h : P.IsTPrivate t) (servers : τ → S) (hcard : Fintype.card τ ≤ t) (i i' : ι) :
(P.tupleQuery servers i).eval = (P.tupleQuery servers i').eval

A t-private scheme hides i from any tuple of at most t (possibly repeated) servers.

theorem Cslib.Crypto.Protocols.PIR.Scheme.isTPrivate_iff_tuple {ι S R Q A β : Type} {P : Scheme ι S R Q A β} {t : ℕ} :
P.IsTPrivate t ↔ ∀ (servers : Fin t → S) (i i' : ι), (P.tupleQuery servers i).eval = (P.tupleQuery servers i').eval

Finset-based t-privacy is equivalent to the t-tuple definition of CGKS, Section 2.2.

theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.of_query_eq {ι S R Q A β : Type} {P : Scheme ι S R Q A β} {ι' R' A' β' : Type} {P' : Scheme ι' S R' Q A' β'} {t : ℕ} (h : P.IsTPrivate t) (f : ι' → ι) (hq : ∀ (i : ι'), (Prod.snd <$> P'.query i).eval = (Prod.snd <$> P.query (f i)).eval) :

t-privacy transfer. If the queries that P' sends for i have the law of the queries that the t-private scheme P sends for f i, then P' is t-private. The retained states, answers and reconstructions of the two schemes are unconstrained.

theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.rows {ι S R Q A β : Type} {P : Scheme ι S R Q A β} (ρ : Type) {t : ℕ} (h : P.IsTPrivate t) :
theorem Cslib.Crypto.Protocols.PIR.Scheme.IsTPrivate.comap {ι S R Q A β ι' : Type} {P : Scheme ι' S R Q A β} {t : ℕ} (h : P.IsTPrivate t) (e : ι ↪ ι') (pad : β) :
(P.comap e pad).IsTPrivate t

Full-coalition lower bound (t ≥ |S|) #

theorem Cslib.Crypto.Protocols.PIR.Scheme.not_isCorrect_of_isEmpty {ι S R Q A β : Type} {P : Scheme ι S R Q A β} [IsEmpty S] [Nonempty ι] [Nontrivial β] (hcorrect : P.IsCorrect) :

No zero-server scheme can be perfectly correct on a nonempty database index type over a nontrivial payload alphabet.

theorem Cslib.Crypto.Protocols.PIR.Scheme.exists_injective_answers_of_card_le {ι S R Q A β : Type} {P : Scheme ι S R Q A β} [Fintype S] [Nonempty ι] {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) (hcard : Fintype.card S ≤ t) :
∃ (q : S → Q), Function.Injective fun (x : ι → β) (s : S) => P.answer s x (q s)

When all servers can collude (|S| ≤ t), some joint query vector makes the combined server answers determine the entire database, generalizing SingleServer.exists_injective_answer.

theorem Cslib.Crypto.Protocols.PIR.Scheme.two_pow_card_le_card_answer_pow_of_card_le {ι S R Q A : Type} [Fintype S] [Nonempty ι] [Fintype ι] [Fintype A] {P : Scheme ι S R Q A} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) (hcard : Fintype.card S ≤ t) :

A correct t-private Boolean scheme with |S| ≤ t satisfies 2 ^ |ι| ≤ |A| ^ |S|.

theorem Cslib.Crypto.Protocols.PIR.Scheme.card_le_communication_of_card_le {ι S R Q A : Type} [Fintype S] [Fintype ι] [Fintype Q] [Fintype A] {P : Scheme ι S R Q A} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) (hcard : Fintype.card S ≤ t) :

Necessity of t < |S| (generalizing CGKS, Section 5.1, p. 14 from k = 1 to full coalitions |S| ≤ t under Section 2.2): if all servers may collude (|S| ≤ t), any perfectly correct t-private scheme for n-bit databases communicates at least n bits.

Existence of t-private schemes #

Some k-server scheme for databases ι → β (by default β = Bool) is perfectly correct, perfectly t-private, and communicates at most c bits.

Some k-server scheme for databases ι → β (by default β = Bool) is perfectly correct and perfectly private and communicates at most c bits: the t = 1 case of HasTPrivateScheme, by Scheme.isTPrivate_one_iff. hasScheme_iff states it with Scheme.IsPrivate.

theorem Cslib.Crypto.Protocols.PIR.hasTPrivateScheme_iff {ι β : Type} {t k c : ℕ} :
HasTPrivateScheme ι t k c β ↔ ∃ (S : Type) (R : Type) (Q : Type) (A : Type) (x : Fintype S) (x_1 : Fintype Q) (x_2 : Fintype A) (P : Scheme ι S R Q A β), P.IsCorrect ∧ P.IsTPrivate t ∧ Fintype.card S = k ∧ communication S Q A ≤ c

1-private scheme existence is HasScheme.

theorem Cslib.Crypto.Protocols.PIR.hasScheme_iff {ι β : Type} {k c : ℕ} :
HasScheme ι k c β ↔ ∃ (S : Type) (R : Type) (Q : Type) (A : Type) (x : Fintype S) (x_1 : Fintype Q) (x_2 : Fintype A) (P : Scheme ι S R Q A β), P.IsCorrect ∧ P.IsPrivate ∧ Fintype.card S = k ∧ communication S Q A ≤ c
theorem Cslib.Crypto.Protocols.PIR.Scheme.IsCorrect.hasTPrivateScheme {ι S R Q A β : Type} [Fintype S] [Fintype Q] [Fintype A] {P : Scheme ι S R Q A β} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) :
theorem Cslib.Crypto.Protocols.PIR.Scheme.IsCorrect.hasScheme {ι S R Q A β : Type} [Fintype S] [Fintype Q] [Fintype A] {P : Scheme ι S R Q A β} (hcorrect : P.IsCorrect) (hprivate : P.IsPrivate) :

A correct, private scheme witnesses HasScheme.

theorem Cslib.Crypto.Protocols.PIR.HasTPrivateScheme.mono {ι β : Type} {t k c c' : ℕ} (h : HasTPrivateScheme ι t k c β) (hc : c ≤ c') :
HasTPrivateScheme ι t k c' β
theorem Cslib.Crypto.Protocols.PIR.HasScheme.mono {ι β : Type} {k c c' : ℕ} (h : HasScheme ι k c β) (hc : c ≤ c') :
HasScheme ι k c' β
theorem Cslib.Crypto.Protocols.PIR.HasTPrivateScheme.mono_threshold {ι β : Type} {t₁ t₂ k c : ℕ} (ht : t₁ ≤ t₂) (h : HasTPrivateScheme ι t₂ k c β) :
HasTPrivateScheme ι t₁ k c β
theorem Cslib.Crypto.Protocols.PIR.HasTPrivateScheme.hasScheme {ι β : Type} {t k c : ℕ} (ht : 1 ≤ t) (h : HasTPrivateScheme ι t k c β) :
HasScheme ι k c β
theorem Cslib.Crypto.Protocols.PIR.HasTPrivateScheme.comap {ι ι' β : Type} [Nonempty β] {t k c : ℕ} (h : HasTPrivateScheme ι' t k c β) (e : ι ↪ ι') :
HasTPrivateScheme ι t k c β

A scheme for a larger index type restricts along an embedding ι ↪ ι' (Scheme.comap), keeping its servers and communication.

theorem Cslib.Crypto.Protocols.PIR.HasScheme.comap {ι ι' β : Type} [Nonempty β] {k c : ℕ} (h : HasScheme ι' k c β) (e : ι ↪ ι') :
HasScheme ι k c β
theorem Cslib.Crypto.Protocols.PIR.HasTPrivateScheme.fin_of_le_card {ι β : Type} [Fintype ι] [Nonempty β] {n t k c : ℕ} (h : HasTPrivateScheme ι t k c β) (hn : n ≤ Fintype.card ι) :
HasTPrivateScheme (Fin n) t k c β

A scheme for a finite index type of size at least n gives one for n-entry databases.

theorem Cslib.Crypto.Protocols.PIR.HasScheme.fin_of_le_card {ι β : Type} [Fintype ι] [Nonempty β] {n k c : ℕ} (h : HasScheme ι k c β) (hn : n ≤ Fintype.card ι) :
HasScheme (Fin n) k c β