PIR with preprocessing relative to an oracle
DefinitionPIRLBThis file fixes the model shared by every statement of the mission.
- Databases and batches. is
DB n, a batch isBatch n k, and isread D Q. - Probability.
prob Pis the probability of the event when the outcome is uniform on a finite type. - Oracle algorithms.
OComp X Y αis an adaptive query tree with oracle ;eval Ois its output,queries Othe list of its queries, andQueryBounded c qsays it makes at most queries for every oracle. - Schemes.
Scheme n k sis a -batch single-server PIR with preprocessing for -bit databases with client state (asFin (2^s)). The oracle is for a uniform seed . The encoding is , the state is , and the online protocol runs a fixed number of rounds: the client sends a message computed by an oracle algorithm from and the server messages so far, and the deterministic server answers with an oracle algorithm run on , the client messages so far, and its own earlier queries and answers. The client then outputs its answer. An honest run samples uniformly. - Properties.
Correct ε: for all , .Private δ q: for all and every deterministic adversary that sees the transcript and and makes at most oracle queries, when comes from an honest run on .OracleFree: does not depend on the oracle.ViewBits t,TranscriptBits t,DownloadBits t: for every oracle, honest runs produce at most distinct server views (transcript plus the server's oracle queries in order), transcripts, or lists of server messages.SrvQueries q: the server makes at most oracle queries online in every honest run.CommDetermined: the server's online queries are a function of the oracle and the transcript.ClientQueries q: on every input, replaying the client side of the online protocol against any list of server messages makes at most oracle queries.
- Dual PIR.
DualPIR n k t hhas shared randomness (uniform on a finite type), advice , hint and reconstruction .successis for uniform , , . - Subkey prediction.
subkeySuccess A₁ A₂is for uniform , , where outputs bits. - Symmetric PIR.
SPIR n k sis a -batch single-server symmetric PIR with preprocessing. The server holds the database and a random string (uniform on a finite set) shared between the two phases. The offline phase produces the client state and an offline transcript from and further coins. The online phase is as forScheme, except that the server's messages are computed from , and its own online coins.Correct ε: for all , the client outputs with probability at least .Private δ q: an adversary that knows , sees , and the online transcript and makes at most oracle queries guesses which of two batches was used with probability at most .DataPrivate γ q: for databases with , an adversary that knows , sees , and the online transcript and makes at most oracle queries guesses which database was used with probability at most .
Formalization Note Parties other than the privacy adversary are arbitrary functions. A finite oracle domain covers random oracles and crypto oracles on inputs of bounded length, and more generally any oracle distribution on a finite domain, which can always be resampled conditioned on finitely many answers. Deterministic adversaries are no loss of generality against computationally unbounded adversaries. Efficiency is counted as the number of distinct possibilities, so "fits in bits" means at most values.
import Mathlib
/-!
# PIR with preprocessing relative to an oracle
Model for "Lower Bounds for PIR with Preprocessing from Blackbox Cryptography"
(Hoover, Persiano, Yeo). All randomness is uniform over finite types, the oracle is
`oracle ω` for a uniformly random seed `ω`, and all parties other than the privacy
adversary are computationally unbounded.
-/
namespace PIRLB
/-- A database of `n` bits. -/
abbrev DB (n : ℕ) := Fin n → Bool
/-- A batch of `k` indices into an `n`-bit database. -/
abbrev Batch (n k : ℕ) := Fin k → Fin n
/-- `D[Q] = (D[q₁], …, D[q_k])`. -/
def read {n k : ℕ} (D : DB n) (Q : Batch n k) : Fin k → Bool := fun j => D (Q j)
/-- Bit strings, used as protocol messages. -/
abbrev Bits := List Bool
/-- Probability of an event when the outcome is uniform on a finite type. -/
noncomputable def prob {Ω : Type*} [Fintype Ω] (P : Ω → Prop) : ℝ := by
classical
exact ((Finset.univ.filter P).card : ℝ) / (Fintype.card Ω : ℝ)
/-- A deterministic oracle algorithm with oracle `X → Y`, as an adaptive query tree. -/
inductive OComp (X Y α : Type) where
| ret : α → OComp X Y α
| query : X → (Y → OComp X Y α) → OComp X Y α
namespace OComp
variable {X Y α : Type}
/-- The output of `c` when run with oracle `O`. -/
def eval (O : X → Y) : OComp X Y α → α
| ret a => a
| query x k => eval O (k (O x))
/-- The oracle queries made by `c` when run with oracle `O`, in order. -/
def queries (O : X → Y) : OComp X Y α → List X
| ret _ => []
| query x k => x :: queries O (k (O x))
/-- `c` makes at most `q` oracle queries, whatever the oracle. -/
def QueryBounded (c : OComp X Y α) (q : ℕ) : Prop :=
∀ O : X → Y, (c.queries O).length ≤ q
end OComp
/-- A `k`-batch single-server PIR with preprocessing for `n`-bit databases with an
`s`-bit client state, relative to an oracle `O = oracle ω` with `ω` uniform.
* `init` is the server's encoding `Init^O(D) → E` with coins in `ΩI`;
* `setup` is the client's state `st ∈ {0,1}^s` produced by `Setup^O(E)` with coins in `ΩS`;
* `Query` runs for `rounds` rounds; in each round the client sends a message computed from
its state, its batch, its coins `ΩC` and the server messages so far, and the server
replies with a message computed from `E`, the client messages so far and its own
earlier oracle queries and answers; finally the client computes its answer. -/
structure Scheme (n k s : ℕ) where
/-- Oracle inputs. -/
X : Type
/-- Oracle outputs. -/
Y : Type
/-- Seeds of the oracle. -/
ΩO : Type
[fintypeΩO : Fintype ΩO]
[nonemptyΩO : Nonempty ΩO]
/-- The oracle with a given seed. -/
oracle : ΩO → X → Y
/-- Encoded databases. -/
E : Type
/-- Coins of `Init`. -/
ΩI : Type
[fintypeΩI : Fintype ΩI]
[nonemptyΩI : Nonempty ΩI]
/-- The encoding algorithm `Init`. -/
init : (X → Y) → ΩI → DB n → E
/-- Coins of `Setup`. -/
ΩS : Type
[fintypeΩS : Fintype ΩS]
[nonemptyΩS : Nonempty ΩS]
/-- The client state output by `Setup`. -/
setup : (X → Y) → E → ΩS → Fin (2 ^ s)
/-- Client coins of `Query`. -/
ΩC : Type
[fintypeΩC : Fintype ΩC]
[nonemptyΩC : Nonempty ΩC]
/-- Number of rounds of `Query`. -/
rounds : ℕ
/-- The client's next message, given the server messages so far. -/
client : Fin (2 ^ s) → Batch n k → ΩC → List Bits → OComp X Y Bits
/-- The client's answer, given all server messages. -/
output : Fin (2 ^ s) → Batch n k → ΩC → List Bits → OComp X Y (Fin k → Bool)
/-- The server's next message, given `E`, the client messages so far (including the
current one) and its earlier oracle queries with their answers. -/
server : E → List Bits → List (X × Y) → OComp X Y Bits
attribute [instance] Scheme.fintypeΩO Scheme.nonemptyΩO Scheme.fintypeΩI Scheme.nonemptyΩI
Scheme.fintypeΩS Scheme.nonemptyΩS Scheme.fintypeΩC Scheme.nonemptyΩC
namespace Scheme
variable {n k s : ℕ} (P : Scheme n k s)
/-- The state of an online execution: client messages, server messages, and the server's
oracle queries with their answers. -/
structure Exec (X Y : Type) where
cmsgs : List Bits
smsgs : List Bits
srvQA : List (X × Y)
/-- One round of `Query`. -/
def step (O : P.X → P.Y) (st : Fin (2 ^ s)) (Q : Batch n k) (ωC : P.ΩC) (e : P.E)
(x : Exec P.X P.Y) : Exec P.X P.Y :=
let c := (P.client st Q ωC x.smsgs).eval O
let cs := x.cmsgs ++ [c]
let srv := P.server e cs x.srvQA
{ cmsgs := cs
smsgs := x.smsgs ++ [srv.eval O]
srvQA := x.srvQA ++ (srv.queries O).map fun y => (y, O y) }
/-- The execution of `Query` with oracle `O`, state `st`, batch `Q`, client coins `ωC` and
encoding `e`. -/
def exec (O : P.X → P.Y) (st : Fin (2 ^ s)) (Q : Batch n k) (ωC : P.ΩC) (e : P.E) :
Exec P.X P.Y :=
(P.step O st Q ωC e)^[P.rounds] ⟨[], [], []⟩
/-- Randomness of an honest run: oracle seed, `Init` coins, `Setup` coins, client coins. -/
abbrev Coins := P.ΩO × P.ΩI × P.ΩS × P.ΩC
/-- The encoding in an honest run. -/
def enc (D : DB n) (ω : P.Coins) : P.E := P.init (P.oracle ω.1) ω.2.1 D
/-- The client state in an honest run. -/
def state (D : DB n) (ω : P.Coins) : Fin (2 ^ s) :=
P.setup (P.oracle ω.1) (P.enc D ω) ω.2.2.1
/-- The online execution in an honest run on database `D` and batch `Q`. -/
def run (D : DB n) (Q : Batch n k) (ω : P.Coins) : Exec P.X P.Y :=
P.exec (P.oracle ω.1) (P.state D ω) Q ω.2.2.2 (P.enc D ω)
/-- The client's answer in an honest run. -/
def answer (D : DB n) (Q : Batch n k) (ω : P.Coins) : Fin k → Bool :=
(P.output (P.state D ω) Q ω.2.2.2 (P.run D Q ω).smsgs).eval (P.oracle ω.1)
/-- `ε`-correctness: for every database and batch, the client answers `D[Q]` with
probability at least `ε`. -/
def Correct (ε : ℝ) : Prop :=
∀ (D : DB n) (Q : Batch n k), ε ≤ prob fun ω : P.Coins => P.answer D Q ω = read D Q
/-- `δ`-privacy against adversaries making at most `q` oracle queries: an adversary that
sees the online transcript and the encoding guesses which of two batches was queried with
probability at most `1/2 + δ`. Adversaries are deterministic, which is no loss of
generality for computationally unbounded adversaries. -/
def Private (δ : ℝ) (q : ℕ) : Prop :=
∀ (D : DB n) (Q₀ Q₁ : Batch n k)
(A : List Bits × List Bits → P.E → OComp P.X P.Y Bool),
(∀ τ e, (A τ e).QueryBounded q) →
prob (fun bω : Bool × P.Coins =>
let x := P.run D (if bω.1 then Q₁ else Q₀) bω.2
(A (x.cmsgs, x.smsgs) (P.enc D bω.2)).eval (P.oracle bω.2.1) = bω.1) ≤ 1 / 2 + δ
/-- Oracle-free encoding: `Init` makes no oracle queries. -/
def OracleFree : Prop :=
∀ (O O' : P.X → P.Y) (ωI : P.ΩI) (D : DB n), P.init O ωI D = P.init O' ωI D
/-- The server's view of an online execution: the transcript and the server's oracle
queries in order. -/
def view (x : Exec P.X P.Y) : List Bits × List Bits × List P.X :=
(x.cmsgs, x.smsgs, x.srvQA.map Prod.fst)
/-- The online transcript together with the server's oracle queries fits in `t` bits:
for every oracle, honest runs produce at most `2 ^ t` distinct views. -/
def ViewBits (t : ℕ) : Prop :=
∀ ωO : P.ΩO,
(Set.range fun a : DB n × Batch n k × P.ΩI × P.ΩS × P.ΩC =>
P.view (P.run a.1 a.2.1 (ωO, a.2.2))).ncard ≤ 2 ^ t
/-- The online transcript fits in `t` bits: for every oracle, honest runs produce at most
`2 ^ t` distinct transcripts. -/
def TranscriptBits (t : ℕ) : Prop :=
∀ ωO : P.ΩO,
(Set.range fun a : DB n × Batch n k × P.ΩI × P.ΩS × P.ΩC =>
let x := P.run a.1 a.2.1 (ωO, a.2.2)
(x.cmsgs, x.smsgs)).ncard ≤ 2 ^ t
/-- The server's online messages fit in `t` bits: for every oracle, honest runs produce at
most `2 ^ t` distinct lists of server messages. -/
def DownloadBits (t : ℕ) : Prop :=
∀ ωO : P.ΩO,
(Set.range fun a : DB n × Batch n k × P.ΩI × P.ΩS × P.ΩC =>
(P.run a.1 a.2.1 (ωO, a.2.2)).smsgs).ncard ≤ 2 ^ t
/-- In every honest run the server makes at most `q` oracle queries online. -/
def SrvQueries (q : ℕ) : Prop :=
∀ (D : DB n) (Q : Batch n k) (ω : P.Coins), (P.run D Q ω).srvQA.length ≤ q
/-- Communication-determined: the server's online oracle queries are a function of the
oracle and the online transcript. -/
def CommDetermined : Prop :=
∃ f : (P.X → P.Y) → List Bits × List Bits → List P.X,
∀ (D : DB n) (Q : Batch n k) (ω : P.Coins),
let x := P.run D Q ω
x.srvQA.map Prod.fst = f (P.oracle ω.1) (x.cmsgs, x.smsgs)
/-- On every input, replaying the client side of `Query` against a list of server messages
(all its messages and its answer) makes at most `q` oracle queries in total. -/
def ClientQueries (q : ℕ) : Prop :=
∀ (O : P.X → P.Y) (st : Fin (2 ^ s)) (Q : Batch n k) (ωC : P.ΩC) (srv : List Bits),
((List.range P.rounds).map fun j => ((P.client st Q ωC (srv.take j)).queries O).length).sum
+ ((P.output st Q ωC srv).queries O).length ≤ q
end Scheme
/-- An `(n, k, t, h)`-dual PIR with shared randomness `ρ` (uniform on a finite type,
independent of the database and the batch): `t`-bit advice computed from the database,
then an `h`-bit hint computed from the database, the batch and the advice, then a
reconstruction from the batch, the advice and the hint. -/
structure DualPIR (n k t h : ℕ) where
/-- Shared randomness. -/
R : Type
[fintypeR : Fintype R]
[nonemptyR : Nonempty R]
advice : R → DB n → Fin (2 ^ t)
hint : R → DB n → Batch n k → Fin (2 ^ t) → Fin (2 ^ h)
recon : R → Batch n k → Fin (2 ^ t) → Fin (2 ^ h) → Fin k → Bool
attribute [instance] DualPIR.fintypeR DualPIR.nonemptyR
/-- The probability that a dual PIR reconstructs `D[Q]` for uniform `D` and `Q`. -/
noncomputable def DualPIR.success {n k t h : ℕ} (T : DualPIR n k t h) : ℝ :=
prob fun x : T.R × DB n × Batch n k =>
let a := T.advice x.1 x.2.1
T.recon x.1 x.2.2 a (T.hint x.1 x.2.1 x.2.2 a) = read x.2.1 x.2.2
/-- Success probability in subkey prediction: `A₁` sees the key `D` and outputs `t` bits of
leakage, then `A₂` sees `Q` and the leakage and guesses `D[Q]`; `D` and `Q` are uniform. -/
noncomputable def subkeySuccess {n k t : ℕ} (A₁ : DB n → Fin (2 ^ t))
(A₂ : Batch n k → Fin (2 ^ t) → Fin k → Bool) : ℝ :=
prob fun x : DB n × Batch n k => A₂ x.2 (A₁ x.1) = read x.1 x.2
/-- A `k`-batch single-server symmetric PIR with preprocessing for `n`-bit databases with an
`s`-bit client state, relative to an oracle `O = oracle ω` with `ω` uniform.
* `ΩR` is the server's random string `R`, shared between the offline and online phases;
* `setup` is the offline phase: from the oracle, the database, `R` and the other coins of the
offline phase (`ΩF`) it gives the client state `st ∈ {0,1}^s` and the offline transcript;
* the online phase runs for `rounds` rounds as in `Scheme`, except that the server's
messages are computed from the database, `R` and its own online coins `ΩV`. -/
structure SPIR (n k s : ℕ) where
/-- Oracle inputs. -/
X : Type
/-- Oracle outputs. -/
Y : Type
/-- Seeds of the oracle. -/
ΩO : Type
[fintypeΩO : Fintype ΩO]
[nonemptyΩO : Nonempty ΩO]
/-- The oracle with a given seed. -/
oracle : ΩO → X → Y
/-- The server's random string, shared between the two phases. -/
ΩR : Type
[fintypeΩR : Fintype ΩR]
[nonemptyΩR : Nonempty ΩR]
/-- The other coins of the offline phase. -/
ΩF : Type
[fintypeΩF : Fintype ΩF]
[nonemptyΩF : Nonempty ΩF]
/-- The offline phase: client state and offline transcript. -/
setup : (X → Y) → DB n → ΩR → ΩF → Fin (2 ^ s) × Bits
/-- Client coins of the online phase. -/
ΩC : Type
[fintypeΩC : Fintype ΩC]
[nonemptyΩC : Nonempty ΩC]
/-- Server coins of the online phase. -/
ΩV : Type
[fintypeΩV : Fintype ΩV]
[nonemptyΩV : Nonempty ΩV]
/-- Number of rounds of the online phase. -/
rounds : ℕ
/-- The client's next message, given the server messages so far. -/
client : Fin (2 ^ s) → Batch n k → ΩC → List Bits → OComp X Y Bits
/-- The client's answer, given all server messages. -/
output : Fin (2 ^ s) → Batch n k → ΩC → List Bits → OComp X Y (Fin k → Bool)
/-- The server's next message, given the database, `R`, its online coins, the client
messages so far (including the current one) and its earlier oracle queries and answers. -/
server : DB n → ΩR → ΩV → List Bits → List (X × Y) → OComp X Y Bits
attribute [instance] SPIR.fintypeΩO SPIR.nonemptyΩO SPIR.fintypeΩR SPIR.nonemptyΩR
SPIR.fintypeΩF SPIR.nonemptyΩF SPIR.fintypeΩC SPIR.nonemptyΩC SPIR.fintypeΩV SPIR.nonemptyΩV
namespace SPIR
variable {n k s : ℕ} (P : SPIR n k s)
/-- Randomness of an honest run: oracle seed, `R`, offline coins, client and server online
coins. -/
abbrev Coins := P.ΩO × P.ΩR × P.ΩF × P.ΩC × P.ΩV
/-- The client state and offline transcript in an honest run. -/
def offline (D : DB n) (ω : P.Coins) : Fin (2 ^ s) × Bits :=
P.setup (P.oracle ω.1) D ω.2.1 ω.2.2.1
/-- One round of the online phase. -/
def step (O : P.X → P.Y) (st : Fin (2 ^ s)) (Q : Batch n k) (ωC : P.ΩC) (D : DB n)
(R : P.ΩR) (ωV : P.ΩV) (x : Scheme.Exec P.X P.Y) : Scheme.Exec P.X P.Y :=
let c := (P.client st Q ωC x.smsgs).eval O
let cs := x.cmsgs ++ [c]
let srv := P.server D R ωV cs x.srvQA
{ cmsgs := cs
smsgs := x.smsgs ++ [srv.eval O]
srvQA := x.srvQA ++ (srv.queries O).map fun y => (y, O y) }
/-- The online phase in an honest run on database `D` and batch `Q`. -/
def run (D : DB n) (Q : Batch n k) (ω : P.Coins) : Scheme.Exec P.X P.Y :=
(P.step (P.oracle ω.1) (P.offline D ω).1 Q ω.2.2.2.1 D ω.2.1 ω.2.2.2.2)^[P.rounds]
⟨[], [], []⟩
/-- The client's answer in an honest run. -/
def answer (D : DB n) (Q : Batch n k) (ω : P.Coins) : Fin k → Bool :=
(P.output (P.offline D ω).1 Q ω.2.2.2.1 (P.run D Q ω).smsgs).eval (P.oracle ω.1)
/-- `ε`-correctness. -/
def Correct (ε : ℝ) : Prop :=
∀ (D : DB n) (Q : Batch n k), ε ≤ prob fun ω : P.Coins => P.answer D Q ω = read D Q
/-- `δ`-privacy against adversaries making at most `q` oracle queries: an adversary that
sees `R`, the offline transcript and the online transcript (and knows `D`) guesses which of
two batches was queried with probability at most `1/2 + δ`. -/
def Private (δ : ℝ) (q : ℕ) : Prop :=
∀ (D : DB n) (Q₀ Q₁ : Batch n k)
(A : P.ΩR → Bits → List Bits × List Bits → OComp P.X P.Y Bool),
(∀ R τo τ, (A R τo τ).QueryBounded q) →
prob (fun bω : Bool × P.Coins =>
let x := P.run D (if bω.1 then Q₁ else Q₀) bω.2
(A bω.2.2.1 (P.offline D bω.2).2 (x.cmsgs, x.smsgs)).eval (P.oracle bω.2.1) = bω.1)
≤ 1 / 2 + δ
/-- `γ`-data privacy against adversaries making at most `q` oracle queries: for two
databases that agree on the queried batch, an adversary that sees the client state, the
offline transcript and the online transcript (and knows the batch) guesses which database
was used with probability at most `1/2 + γ`. -/
def DataPrivate (γ : ℝ) (q : ℕ) : Prop :=
∀ (Q : Batch n k) (D₀ D₁ : DB n), read D₀ Q = read D₁ Q →
∀ A : Fin (2 ^ s) → Bits → List Bits × List Bits → OComp P.X P.Y Bool,
(∀ st τo τ, (A st τo τ).QueryBounded q) →
prob (fun bω : Bool × P.Coins =>
let D := if bω.1 then D₁ else D₀
let x := P.run D Q bω.2
(A (P.offline D bω.2).1 (P.offline D bω.2).2 (x.cmsgs, x.smsgs)).eval
(P.oracle bω.2.1) = bω.1) ≤ 1 / 2 + γ
end SPIR
end PIRLB
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Basic objects. For , a database is (a function , where ), a batch is (an arbitrary function ; repeated indices are allowed and is allowed), and . Messages are finite bit strings. If and there are no batches at all; if there is exactly one batch and is the unique empty tuple.
Probability. For a finite type and a predicate ,
the uniform probability; by the real-division convention this equals when is empty.
Oracle algorithms. An oracle computation with oracle and output in is a finite adaptive query tree: either it returns a value, or it asks a point and continues depending on the answer. Running it against an oracle gives an output and an ordered list of queried points . It is -query bounded if for every oracle the query list has length .
Scheme consists of: arbitrary types (oracle inputs/outputs, no finiteness required); a finite nonempty seed set with oracle family ; an arbitrary type of encodings; finite nonempty coin sets ; a function (a plain function of the oracle as a whole, not a query tree); a function (the client state, i.e. an -bit value; again a plain function of the oracle); a number of rounds ; a client next-message oracle computation producing a bit string from the server messages so far; a client output oracle computation ; and a deterministic server oracle computation producing a bit string from the encoding, the client messages so far and its own earlier (query, answer) pairs. The server has no private coins.
Execution. Starting from empty lists, one round (with oracle , state , batch , coins , encoding ) computes the client message , appends it to the client messages, runs with , appends its output to the server messages and appends its query points with their -answers to the server's query/answer list. The execution is iterations of this round. An honest run uses coins uniform on , oracle , encoding , state ; the answer is .
Properties of a scheme.
- -correct: for every and every , . (Vacuous if there are no batches, i.e. ; trivially true for ; forces whenever a batch exists.)
- -private: for every , every , and every deterministic adversary (an oracle computation taking the transcript = (client messages, server messages) and the encoding , and outputting a bit) that is -query bounded for every :
where is the transcript of the honest run on and with coins , and the honest encoding. The adversary sees neither the server's oracle query/answer list nor the Setup coins/state; it may depend on . (Since a constant adversary achieves exactly , the property is false for whenever a batch exists; vacuously true when .)
- Oracle-free: for all oracles .
- View of an execution: (client messages, server messages, list of the server's query points in order, without answers).
- ViewBits: for every fixed seed , the number of distinct views of honest runs, as ranges over all values, is . TranscriptBits: same with the transcript (client msgs, server msgs). DownloadBits: same with only the list of server messages. (Domains are finite, so these counts are genuine finite cardinalities.)
- SrvQueries: in every honest run (every ) the server's total online query list has length .
- CommDetermined: there is a function of (oracle, transcript) such that in every honest run the server's query points equal .
- ClientQueries: for every oracle (arbitrary, not only ), state, batch, client coins and every list of bit strings (any length),
where is the first entries (or all of them if fewer).
Dual PIR : a finite nonempty randomness set and functions , , . Its success is
with uniform on and uniform on (with repetition). If , the sample space is empty and .
Subkey success of deterministic and is , uniform as above (again if ).
Symmetric PIR with preprocessing, consists of: arbitrary types ; a finite nonempty seed set with oracles ; finite nonempty sets (the server's random string ), (other offline coins), (client online coins), (server online coins); an offline function giving a client state and an offline transcript (a bit string); this is a plain function of the whole oracle, not an interactive protocol and not a query tree. It also has a number of rounds , client next-message and output oracle computations , as for , and a server oracle computation . Online, the server sees the database , , , the client messages so far and its earlier (query, answer) pairs. It does not see , or .
Honest SPIR run. Coins are uniform on , with and . The online phase is rounds of the same round structure as for , with the server computation . The answer is .
- SPIR -correct: for every , .
- SPIR -(client-)private: for every and every deterministic adversary that is -query bounded for all inputs, , where = (client msgs, server msgs) of the run on . The adversary knows , , and the online transcript. It does not see the server's online coins , the server's oracle query/answer list, , or .
- SPIR -data private: for every and every with , and every deterministic -query-bounded adversary : , where come from the run on and . The adversary knows , , and the transcript. It does not see the client's online coins , , or . Because batches may repeat indices, taking makes the hypothesis just .
Note on oracles: since is finite and the privacy notions are used below for every query bound , an adversary with enough queries can identify the oracle seed among finitely many candidates.