Documentation

CslibFrontier.Crypto.Protocols.PIR.MultiInteractive

Multi-server interactive private information retrieval and full-coalition lower bounds #

PIR.Interactive formalizes arbitrary-round single-server private information retrieval (Chor, Goldreich, Kushilevitz and Sudan, Section 5.1), while PIR.Collusion extends t-privacy and the n-bit full-coalition lower bound (|S| ≤ t) to one-round k-server schemes.

This module models adaptive multi-round k-server PIR (PIR.MultiInteractiveScheme) where the k servers do not observe one another's channels:

Main definitions #

Main results #

References #

A single directional bit event on a server's channel: either sent by the user (fromUser) or sent by the server (fromServer).

  • fromUser (b : Bool) : ChannelMsg

    One bit sent from the user to the server.

  • fromServer (b : Bool) : ChannelMsg

    One bit sent from the server to the user.

Instances For

    Extract the underlying payload bit from a ChannelMsg.

    An adaptive multi-round interaction tree between a user (holding y : Y) and servers s : S, producing an output in Z. Server replies are supplied separately by channel-isolated server strategies so no server's reply can depend on another server's messages.

    Worst-case number of bits exchanged along any branch of the interaction tree.

    def Cslib.Crypto.Protocols.PIR.MultiRoundTree.compile {S X Y Z : Type} {D : S → Type} [DecidableEq S] (serverBit : (s : S) → X → D s → List ChannelMsg → Bool) (hist : S → List ChannelMsg) :
    MultiRoundTree S Y Z → Communication.Protocol (X × ((s : S) → D s)) Y Z

    Compile a MultiRoundTree together with channel-isolated server strategies serverBit and current per-server directional channel histories hist into a two-party Communication.Protocol between the combined server family (Alice) and the user (Bob).

    @[simp]
    theorem Cslib.Crypto.Protocols.PIR.MultiRoundTree.depth_compile {S X Y Z : Type} {D : S → Type} [DecidableEq S] (serverBit : (s : S) → X → D s → List ChannelMsg → Bool) (hist : S → List ChannelMsg) (tree : MultiRoundTree S Y Z) :
    (compile serverBit hist tree).depth = tree.depth
    def Cslib.Crypto.Protocols.PIR.MultiRoundTree.execTrace {S X Y Z : Type} {D : S → Type} [DecidableEq S] (serverBit : (s : S) → X → D s → List ChannelMsg → Bool) (hist : S → List ChannelMsg) :
    MultiRoundTree S Y Z → X → ((s : S) → D s) → Y → List (S × ChannelMsg)

    Ordered trace of (server, directional message) channel events produced on inputs (x, d) and y.

    structure Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme (ι S C : Type) (D : S → Type) (β : Type := Bool) :

    A channel-isolated multi-round k-server PIR scheme for databases x : ι → β (by default β = Bool) with user coins C and per-server coins D : S → Type.

    • userCoins : ι → ProbComp C

      The user's private coins for index i.

    • serverCoins : ProbComp ((s : S) → D s)

      Joint draw of server coins (for independent servers, OracleComp.pi).

    • serverBit (s : S) : (ι → β) → D s → List ChannelMsg → Bool

      Deterministic bit-response function of server s, depending only on the database, server s's coins, and the directional history of bits previously exchanged on s's channel.

    • tree : MultiRoundTree S (ι × C) (ι × C → β)

      Adaptive interaction tree controller, with leaves labelled by the user's output from (i, c).

    Compile P into the two-party InteractiveScheme between the combined server coalition and the user.

    def Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.run {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (x : ι → β) (i : ι) :

    The user's output distribution on database x and index i.

    @[simp]
    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.run_toInteractiveScheme {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (x : ι → β) (i : ι) :
    def Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.coalitionTranscript {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (T : Finset S) (x : ι → β) (i : ι) :

    Sub-trace of directional channel events (s, msg) observed by a server coalition T : Finset S.

    def Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.serverTranscript {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (s : S) (x : ι → β) (i : ι) :

    Single-server directional channel transcript exchanged with server s.

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

    Perfect single-server privacy: each individual server's directional channel transcript has an index-independent distribution on every database.

    Perfect t-privacy: every coalition T of at most t servers sees an index-independent directional communication sub-trace on every database.

    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.eval_coalitionTranscript {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (T : Finset S) (x : ι → β) (i : ι) :
    (P.coalitionTranscript T x i).eval = PMF.map (fun (cd : C × ((s : S) → D s)) => List.filter (fun (sm : S × ChannelMsg) => decide (sm.1 ∈ T)) (MultiRoundTree.execTrace P.serverBit (fun (x : S) => []) P.tree x cd.2 (i, cd.1))) (P.toInteractiveScheme.coins i).eval
    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.eval_serverTranscript {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (s : S) (x : ι → β) (i : ι) :
    (P.serverTranscript s x i).eval = PMF.map (fun (cd : C × ((s : S) → D s)) => List.map Prod.snd (List.filter (fun (sm : S × ChannelMsg) => decide (sm.1 = s)) (MultiRoundTree.execTrace P.serverBit (fun (x : S) => []) P.tree x cd.2 (i, cd.1)))) (P.toInteractiveScheme.coins i).eval
    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.isCorrect_iff {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) :
    P.IsCorrect ↔ ∀ (x : ι → β) (i : ι), ∀ c ∈ (P.userCoins i).eval.support, ∀ d ∈ P.serverCoins.eval.support, (MultiRoundTree.compile P.serverBit (fun (x : S) => []) P.tree).leafOutput ((MultiRoundTree.compile P.serverBit (fun (x : S) => []) P.tree).leaf (x, d) (i, c)) (i, c) = x i
    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.isPrivate_iff {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) :
    P.IsPrivate ↔ ∀ (s : S) (x : ι → β) (i i' : ι), (P.serverTranscript s x i).eval = (P.serverTranscript s x i').eval
    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.isTPrivate_iff {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) (t : ℕ) :
    P.IsTPrivate t ↔ ∀ (T : Finset S), T.card ≤ t → ∀ (x : ι → β) (i i' : ι), (P.coalitionTranscript T x i).eval = (P.coalitionTranscript T x i').eval
    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.IsTPrivate.mono {ι S C β : Type} {D : S → Type} [DecidableEq S] (P : MultiInteractiveScheme ι S C D β) {t₁ t₂ : ℕ} (hle : t₁ ≤ t₂) (h : P.IsTPrivate t₂) :
    P.IsTPrivate t₁

    When all servers collude (|S| ≤ t), t-privacy gives two-party InteractiveScheme.IsPrivate on P.toInteractiveScheme, because the full trace coalitionTranscript Finset.univ determines the reached protocol leaf.

    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.card_le_depth_of_card_le {ι S C : Type} {D : S → Type} [DecidableEq S] [Fintype S] [Fintype ι] {P : MultiInteractiveScheme ι S C D} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) (hcard : Fintype.card S ≤ t) :

    Full-coalition multi-round lower bound (|S| ≤ t) CGKS, Sections 2.2 and 5.1: if all k servers may collude, even arbitrary adaptive multi-round interaction requires at least |ι| bits of total communication.

    theorem Cslib.Crypto.Protocols.PIR.MultiInteractiveScheme.card_mul_le_depth_of_card_le {ι S C : Type} {D : S → Type} [DecidableEq S] {κ : Type} [Fintype S] [Fintype ι] [Fintype κ] {P : MultiInteractiveScheme ι S C D (κ → Bool)} {t : ℕ} (hcorrect : P.IsCorrect) (hprivate : P.IsTPrivate t) (hcard : Fintype.card S ≤ t) :

    Full-coalition multi-round block lower bound (|S| ≤ t) CGKS, Sections 2.2, 4 and 5.1: on (κ → Bool) block databases, full-coalition t-privacy (|S| ≤ t) forces at least |ι| · |κ| bits across all rounds.