Documentation

CslibFrontier.Crypto.Protocols.PIR.Indexed

Private information retrieval with per-server query and answer types #

PIR.Scheme assigns a single query alphabet Q and answer alphabet A to all servers s : S, charging |S| · (⌈log₂ |Q|⌉ + ⌈log₂ |A|⌉) bits (PIR.communication). In several constructions of Chor, Goldreich, Kushilevitz and Sudan — notably the general covering-code Theorem 1 of Section 3.3 (p. 9, Footnote 1), where server s emulates m_s assigned non-codeword neighbours and replies with 1 + m_s · ℓ bits — different servers send answers of different fixed lengths.

This module introduces PIR.IndexedScheme ι S R Q A β (with Q A : S → Type and default payload β = Bool) and its per-server fixed-length bit count PIR.indexedCommunication S Q A = ∑ s : S, (⌈log₂ |Q s|⌉ + ⌈log₂ |A s|⌉):

Main definitions #

Main results #

References #

structure Cslib.Crypto.Protocols.PIR.IndexedScheme (ι S R : Type) (Q A : S → Type) (β : Type := Bool) :

A one-round private information retrieval scheme with server-indexed query types Q : S → Type and answer types A : S → Type, for databases x : ι → β (by default β = Bool) CGKS, Definition 1 and Section 3.3.

  • query : ι → ProbComp (R × ((s : S) → Q s))

    The user's query generator: for the index i, a retained state and one query q s : Q s per server s.

  • answer (s : S) : (ι → β) → Q s → A s

    The deterministic answer of server s, holding database x, to its query q : Q s.

  • reconstruct : ι → R → ((s : S) → A s) → β

    The user's reconstruction of x i from the retained state and the servers' answers.

def Cslib.Crypto.Protocols.PIR.indexedCommunication (S : Type) [Fintype S] (Q A : S → Type) [(s : S) → Fintype (Q s)] [(s : S) → Fintype (A s)] :

Total fixed-length communication cost of an IndexedScheme: the sum over all servers s : S of the binary encoding length ⌈log₂ |Q s|⌉ + ⌈log₂ |A s|⌉ of server s's query and answer.

theorem Cslib.Crypto.Protocols.PIR.indexedCommunication_eq (S : Type) [Fintype S] (Q A : S → Type) [(s : S) → Fintype (Q s)] [(s : S) → Fintype (A s)] :
indexedCommunication S Q A = ∑ s : S, (Nat.clog 2 (Fintype.card (Q s)) + Nat.clog 2 (Fintype.card (A s)))
@[simp]
theorem Cslib.Crypto.Protocols.PIR.indexedCommunication_const (S Q A : Type) [Fintype S] [Fintype Q] [Fintype A] :
(indexedCommunication S (fun (x : S) => Q) fun (x : S) => A) = communication S Q A

On constant query and answer types, indexedCommunication coincides with PIR.communication.

theorem Cslib.Crypto.Protocols.PIR.indexedCommunication_of_card_answer (S : Type) [Fintype S] (Q A : S → Type) [(s : S) → Fintype (Q s)] [(s : S) → Fintype (A s)] {aBits : S → ℕ} (hA : ∀ (s : S), Fintype.card (A s) = 2 ^ aBits s) :
indexedCommunication S Q A = ∑ s : S, (Nat.clog 2 (Fintype.card (Q s)) + aBits s)

When server s's answers have cardinality 2 ^ (aBits s), its answer contributes aBits s bits to indexedCommunication.

theorem Cslib.Crypto.Protocols.PIR.indexedCommunication_rows (S : Type) [Fintype S] (Q : S → Type) [(s : S) → Fintype (Q s)] (ρ : Type) [Fintype ρ] [DecidableEq ρ] :
(indexedCommunication S Q fun (x : S) => ρ → Bool) = ∑ s : S, (Nat.clog 2 (Fintype.card (Q s)) + Fintype.card ρ)

Repeating single-bit per-server answers across rows ρ multiplies each server's answer cost by |ρ|.

def Cslib.Crypto.Protocols.PIR.IndexedScheme.run {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (x : ι → β) (i : ι) :

Run P on database x and target index i.

def Cslib.Crypto.Protocols.PIR.IndexedScheme.serverQuery {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (s : S) (i : ι) :
ProbComp (Q s)

The marginal query received by server s when the user requests index i.

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

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

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

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

def Cslib.Crypto.Protocols.PIR.IndexedScheme.IsCorrect {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) :

Perfect correctness: on every database and index, P.run x i outputs x i with probability 1.

def Cslib.Crypto.Protocols.PIR.IndexedScheme.IsPrivate {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) :

Perfect single-server privacy: each server's query distribution is independent of i.

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

Perfect t-privacy: every coalition of at most t servers sees an index-independent joint query distribution.

theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.serverQuery_eq {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (s : S) (i : ι) :
P.serverQuery s i = (fun (x : R × ((s : S) → Q s)) => match x with | (fst, q) => q s) <$> P.query i
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.coalitionQuery_eq {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (T : Finset S) (i : ι) :
P.coalitionQuery T i = (fun (x : R × ((s : S) → Q s)) (s : ↥T) => match x with | (fst, q) => q ↑s) <$> P.query i
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.eval_run {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (x : ι → β) (i : ι) :
(P.run x i).eval = PMF.map (fun (rq : R × ((s : S) → Q s)) => P.reconstruct i rq.1 fun (s : S) => P.answer s x (rq.2 s)) (P.query i).eval
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.eval_serverQuery {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (s : S) (i : ι) :
(P.serverQuery s i).eval = PMF.map (fun (rq : R × ((s : S) → Q s)) => rq.2 s) (P.query i).eval
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.eval_coalitionQuery {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) (T : Finset S) (i : ι) :
(P.coalitionQuery T i).eval = PMF.map (fun (rq : R × ((s : S) → Q s)) (s : ↥T) => rq.2 ↑s) (P.query i).eval
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.eval_tupleQuery {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) {τ : Type} (servers : τ → S) (i : ι) :
(P.tupleQuery servers i).eval = PMF.map (fun (rq : R × ((s : S) → Q s)) (j : τ) => rq.2 (servers j)) (P.query i).eval
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isCorrect_iff {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) :
P.IsCorrect ↔ ∀ (x : ι → β) (i : ι) (r : R) (q : (s : S) → Q s), (r, q) ∈ (P.query i).eval.support → (P.reconstruct i r fun (s : S) => P.answer s x (q s)) = x i
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isPrivate_iff {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) :
P.IsPrivate ↔ ∀ (s : S) (i i' : ι), (P.serverQuery s i).eval = (P.serverQuery s i').eval
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isTPrivate_iff {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι 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.IndexedScheme.IsCorrect.reconstruct_eq {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} (h : P.IsCorrect) (x : ι → β) (i : ι) {r : R} {q : (s : S) → Q s} (hrq : (r, q) ∈ (P.query i).eval.support) :
(P.reconstruct i r fun (s : S) => P.answer s x (q s)) = x i
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsPrivate.eval_serverQuery_eq {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} (h : P.IsPrivate) (s : S) (i i' : ι) :
(P.serverQuery s i).eval = (P.serverQuery s i').eval
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsTPrivate.eval_coalitionQuery_eq {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} {t : ℕ} (h : P.IsTPrivate t) (T : Finset S) (hT : T.card ≤ t) (i i' : ι) :

Dependent-sum bridge to uniform PIR.Scheme #

noncomputable def Cslib.Crypto.Protocols.PIR.IndexedScheme.toSigmaScheme {ι S R β : Type} {Q A : S → Type} [DecidableEq S] (P : IndexedScheme ι S R Q A β) (defaultA : (s : S) → A s) (fallback : β) :
Scheme ι S R ((s : S) × Q s) ((s : S) × A s) β

Full dependent-sum Scheme embedding both queries and answers of P into Σ s, Q s and Σ s, A s, preserving run, IsCorrect, IsPrivate and IsTPrivate.

theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.eval_run_toSigmaScheme {ι S R β : Type} {Q A : S → Type} [DecidableEq S] (P : IndexedScheme ι S R Q A β) (defaultA : (s : S) → A s) (fallback : β) (x : ι → β) (i : ι) :
((P.toSigmaScheme defaultA fallback).run x i).eval = (P.run x i).eval
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isCorrect_toSigmaScheme_iff {ι S R β : Type} {Q A : S → Type} [DecidableEq S] (P : IndexedScheme ι S R Q A β) (defaultA : (s : S) → A s) (fallback : β) :
(P.toSigmaScheme defaultA fallback).IsCorrect ↔ P.IsCorrect
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isTPrivate_toSigmaScheme_iff {ι S R β : Type} {Q A : S → Type} [DecidableEq S] (P : IndexedScheme ι S R Q A β) (defaultA : (s : S) → A s) (fallback : β) (t : ℕ) :
(P.toSigmaScheme defaultA fallback).IsTPrivate t ↔ P.IsTPrivate t
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isPrivate_toSigmaScheme_iff {ι S R β : Type} {Q A : S → Type} [DecidableEq S] (P : IndexedScheme ι S R Q A β) (defaultA : (s : S) → A s) (fallback : β) :
(P.toSigmaScheme defaultA fallback).IsPrivate ↔ P.IsPrivate
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isTPrivate_zero {ι S R β : Type} {Q A : S → Type} (P : IndexedScheme ι S R Q A β) :
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsTPrivate.mono {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} {t₁ t₂ : ℕ} (hle : t₁ ≤ t₂) (h : P.IsTPrivate t₂) :
P.IsTPrivate t₁
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isTPrivate_one_iff {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} :

1-privacy is equivalent to single-server IsPrivate.

theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsTPrivate.isPrivate {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} {t : ℕ} (ht : 1 ≤ t) (h : P.IsTPrivate t) :
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.isTPrivate_iff_tuple {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι 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 t-tuple query independence.

Row repetition and index embeddings #

def Cslib.Crypto.Protocols.PIR.IndexedScheme.rows {ι S R β : Type} {Q A : S → Type} (ρ : Type) (P : IndexedScheme ι S R Q A β) :
IndexedScheme (ρ × ι) S R Q (fun (s : S) => ρ → A s) β

Matrix row repetition CGKS, Section 3.4 for IndexedScheme.

@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.query_rows {ι S R β : Type} {Q A : S → Type} (ρ : Type) (P : IndexedScheme ι S R Q A β) (ji : ρ × ι) :
(rows ρ P).query ji = P.query ji.2
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.run_rows {ι S R β : Type} {Q A : S → Type} (ρ : Type) (P : IndexedScheme ι S R Q A β) (x : ρ × ι → β) (ji : ρ × ι) :
(rows ρ P).run x ji = P.run (fun (i : ι) => x (ji.1, i)) ji.2
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.serverQuery_rows {ι S R β : Type} {Q A : S → Type} (ρ : Type) (P : IndexedScheme ι S R Q A β) (s : S) (ji : ρ × ι) :
(rows ρ P).serverQuery s ji = P.serverQuery s ji.2
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.coalitionQuery_rows {ι S R β : Type} {Q A : S → Type} (ρ : Type) (P : IndexedScheme ι S R Q A β) (T : Finset S) (ji : ρ × ι) :
(rows ρ P).coalitionQuery T ji = P.coalitionQuery T ji.2
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsCorrect.rows {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} (ρ : Type) (h : P.IsCorrect) :
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsPrivate.rows {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} (ρ : Type) (h : P.IsPrivate) :
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsTPrivate.rows {ι S R β : Type} {Q A : S → Type} {P : IndexedScheme ι S R Q A β} (ρ : Type) {t : ℕ} (h : P.IsTPrivate t) :
noncomputable def Cslib.Crypto.Protocols.PIR.IndexedScheme.comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} (P : IndexedScheme ι' S R Q A β) (e : ι ↪ ι') (pad : β) :
IndexedScheme ι S R Q A β

Restrict an IndexedScheme along an index embedding e : ι ↪ ι', padding outside the image with pad.

@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.query_comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} (P : IndexedScheme ι' S R Q A β) (e : ι ↪ ι') (pad : β) (i : ι) :
(P.comap e pad).query i = P.query (e i)
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.serverQuery_comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} (P : IndexedScheme ι' S R Q A β) (e : ι ↪ ι') (pad : β) (s : S) (i : ι) :
(P.comap e pad).serverQuery s i = P.serverQuery s (e i)
@[simp]
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.coalitionQuery_comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} (P : IndexedScheme ι' S R Q A β) (e : ι ↪ ι') (pad : β) (T : Finset S) (i : ι) :
(P.comap e pad).coalitionQuery T i = P.coalitionQuery T (e i)
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsCorrect.comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} {P : IndexedScheme ι' S R Q A β} (h : P.IsCorrect) (e : ι ↪ ι') (pad : β) :
(P.comap e pad).IsCorrect
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsPrivate.comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} {P : IndexedScheme ι' S R Q A β} (h : P.IsPrivate) (e : ι ↪ ι') (pad : β) :
(P.comap e pad).IsPrivate
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsTPrivate.comap {ι S R β : Type} {Q A : S → Type} {ι' : Type} {P : IndexedScheme ι' S R Q A β} {t : ℕ} (h : P.IsTPrivate t) (e : ι ↪ ι') (pad : β) :
(P.comap e pad).IsTPrivate t

Full-coalition and single-server lower bounds #

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

No zero-server IndexedScheme is correct on a nonempty index set over a nontrivial payload.

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

When all servers can collude (|S| ≤ t), some joint query tuple q : (s : S) → Q s makes the combined answer map x ↦ fun s => P.answer s x (q s) injective, deduced via toSigmaScheme from Scheme.exists_injective_answers_of_card_le.

theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.two_pow_card_le_prod_card_answer_of_card_le {ι S R : Type} {Q A : S → Type} [Fintype S] [Nonempty ι] [Fintype ι] [(s : S) → Fintype (A s)] {P : IndexedScheme ι S R Q A} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) (hcard : Fintype.card S ≤ t) :
2 ^ Fintype.card ι ≤ ∏ s : S, Fintype.card (A s)

A correct t-private Boolean IndexedScheme with |S| ≤ t satisfies 2 ^ |ι| ≤ ∏ s : S, |A s|.

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

Full-coalition lower bound for heterogeneous server widths: if |S| ≤ t, any perfectly correct t-private Boolean IndexedScheme communicates at least |ι| bits in total across the servers.

theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.card_le_indexedCommunication {ι S R : Type} {Q A : S → Type} [Fintype S] [Unique S] [Fintype ι] [(s : S) → Fintype (Q s)] [(s : S) → Fintype (A s)] {P : IndexedScheme ι S R Q A} (hcorrect : P.IsCorrect) (hprivate : P.IsPrivate) :

Single-server lower bound for heterogeneous schemes: with one server, any perfectly correct and perfectly private Boolean IndexedScheme communicates at least |ι| bits.

Embedding uniform PIR.Scheme into PIR.IndexedScheme #

def Cslib.Crypto.Protocols.PIR.Scheme.toIndexed {ι S R Q A β : Type} (P : Scheme ι S R Q A β) :
IndexedScheme ι S R (fun (x : S) => Q) (fun (x : S) => A) β

View a uniform P : Scheme ι S R Q A β as an IndexedScheme with constant message types.

@[simp]
theorem Cslib.Crypto.Protocols.PIR.Scheme.query_toIndexed {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (i : ι) :
@[simp]
theorem Cslib.Crypto.Protocols.PIR.Scheme.answer_toIndexed {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (s : S) (x : ι → β) (q : Q) :
P.toIndexed.answer s x q = P.answer s x q
@[simp]
theorem Cslib.Crypto.Protocols.PIR.Scheme.reconstruct_toIndexed {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (i : ι) (r : R) (a : S → A) :
@[simp]
theorem Cslib.Crypto.Protocols.PIR.Scheme.eval_run_toIndexed {ι S R Q A β : Type} (P : Scheme ι S R Q A β) (x : ι → β) (i : ι) :
(P.toIndexed.run x i).eval = (P.run x i).eval
@[simp]

Existence of heterogeneous schemes #

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

Some k-server IndexedScheme for databases ι → β is perfectly correct, perfectly t-private, and communicates at most c bits in total.

theorem Cslib.Crypto.Protocols.PIR.hasIndexedScheme_iff {ι β : Type} {k c : ℕ} :
HasIndexedScheme ι k c β ↔ ∃ (S : Type) (R : Type) (Q : S → Type) (A : S → Type) (x : Fintype S) (x_1 : (s : S) → Fintype (Q s)) (x_2 : (s : S) → Fintype (A s)) (P : IndexedScheme ι S R Q A β), P.IsCorrect ∧ P.IsPrivate ∧ Fintype.card S = k ∧ indexedCommunication S Q A ≤ c
theorem Cslib.Crypto.Protocols.PIR.hasTPrivateIndexedScheme_iff {ι β : Type} {t k c : ℕ} :
HasTPrivateIndexedScheme ι t k c β ↔ ∃ (S : Type) (R : Type) (Q : S → Type) (A : S → Type) (x : Fintype S) (x_1 : (s : S) → Fintype (Q s)) (x_2 : (s : S) → Fintype (A s)) (P : IndexedScheme ι S R Q A β), P.IsCorrect ∧ P.IsTPrivate t ∧ Fintype.card S = k ∧ indexedCommunication S Q A ≤ c
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsCorrect.hasIndexedScheme {ι S R β : Type} {Q A : S → Type} [Fintype S] [(s : S) → Fintype (Q s)] [(s : S) → Fintype (A s)] {P : IndexedScheme ι S R Q A β} (hcorrect : P.IsCorrect) (hprivate : P.IsPrivate) :
theorem Cslib.Crypto.Protocols.PIR.IndexedScheme.IsCorrect.hasTPrivateIndexedScheme {ι S R β : Type} {Q A : S → Type} [Fintype S] [(s : S) → Fintype (Q s)] [(s : S) → Fintype (A s)] {P : IndexedScheme ι S R Q A β} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) :
theorem Cslib.Crypto.Protocols.PIR.HasIndexedScheme.mono {ι β : Type} {k c c' : ℕ} (h : HasIndexedScheme ι k c β) (hc : c ≤ c') :
HasIndexedScheme ι k c' β
theorem Cslib.Crypto.Protocols.PIR.HasTPrivateIndexedScheme.mono {ι β : Type} {t k c c' : ℕ} (h : HasTPrivateIndexedScheme ι t k c β) (hc : c ≤ c') :
theorem Cslib.Crypto.Protocols.PIR.HasTPrivateIndexedScheme.mono_threshold {ι β : Type} {t₁ t₂ k c : ℕ} (ht : t₁ ≤ t₂) (h : HasTPrivateIndexedScheme ι t₂ k c β) :
theorem Cslib.Crypto.Protocols.PIR.HasScheme.hasIndexedScheme {ι β : Type} {k c : ℕ} (h : HasScheme ι k c β) :

Every uniform HasScheme witness is also a HasIndexedScheme witness at the same cost.

Every uniform HasTPrivateScheme witness is also a HasTPrivateIndexedScheme witness.

One server needs n bits even with per-server message types: a perfectly correct and perfectly private one-server IndexedScheme communicating c bits exists iff |ι| ≤ c.