Covering-code schemes for private information retrieval #
The subcube scheme PIR.cube uses 2 ^ d servers, one for each σ : D → Bool. The covering-code
method of Chor, Goldreich, Kushilevitz and Sudan, Section 3.3
keeps only the servers of a radius-1 covering code of D → Bool and lets each of them emulate
its neighbours.
The server σ knows its query (T l ⊕ σ l e_{i l})_l. The query of the neighbour that differs from
it at l differs from it only in the l-th set, by flipping one unknown position i l. So σ can
send the answers for all ℓ choices of that position, and the user picks the right one. The kept
servers receive the queries of PIR.cube, so privacy is inherited
(PIR.RadiusOneCover.isPrivate_scheme). The user recovers the 2 ^ d answers of PIR.cube, so
correctness is too (PIR.RadiusOneCover.isCorrect_scheme).
A PIR.RadiusOneCover S D M fixes this data, following the footnote to Section 3.3 (an exact
cover of the cube by subsets of the radius-1 balls):
- the codewords
code sof the serverss : S; - for each server, the directions
dir s r(forr : M) of the neighbours it emulates; - a map
coverassigning to each wordw : D → Boola server, and possibly one of its directions, that producew.
The volume bound 2 ^ d ≤ |S| (|M| + 1) follows (PIR.RadiusOneCover.two_pow_card_le).
Communication. The library measures communication with fixed-length queries and answers
(PIR.communication), so every server answers with 1 + |M| ℓ bits, as if it emulated |M|
neighbours. The scheme communicates k ((d + m) ℓ + 1) bits, where k = |S| and m = |M|
(PIR.RadiusOneCover.communication_scheme). The source counts k + (2 ^ d - k) ℓ answer bits
instead, emulating each non-codeword once with possibly different answer lengths. The two counts
agree when the cover is balanced, k (m + 1) = 2 ^ d
(PIR.RadiusOneCover.communication_scheme_of_balanced): cover is then a bijection, so every
server emulates m distinct neighbours and no word is produced twice. The count is then the bound
k + (2 ^ d + (d - 1) k) ℓ of Theorem 1. Balance is a property of the cover; the source's
"balancing" (end of Section 3.2, Section 3.4) refers instead to the split of communication between
the user and the servers. Variable-length per-server answers and radius-r covers are formalized
in PIR.Indexed and PIR.GeneralCover (PIR.hasIndexedScheme_of_hammingDist proves Theorem 1 for
arbitrary injective radius-1 covering codes); in the uniform fixed-length model here, Theorem 1 is
covered for balanced covers only. Every radius-1 covering code gives a cover with M = D,
emulating all neighbours (PIR.RadiusOneCover.ofHammingDist), with k (2 d ℓ + 1) bits; this is
the bound of Theorem 1 exactly when the code is perfect.
A new cover of a concrete cube Fin d → Bool can be supplied by discharging coveredWord_cover
with decide, as for PIR.RadiusOneCover.cubeThree and PIR.RadiusOneCover.cubeFour.
Both cases of Corollary 2 use balanced covers:
- two servers, the repetition code
{000, 111}(PIR.RadiusOneCover.cubeThree), with12 ℓ + 2bits forn ≤ ℓ ^ 3(PIR.hasScheme_two_of_le_pow_three); - four servers, the code
{0000, 1111, 1000, 0111}(PIR.RadiusOneCover.cubeFour), with28 ℓ + 4bits forn ≤ ℓ ^ 4(PIR.hasScheme_four_of_le_pow_four).
Main definitions #
Cslib.Crypto.Protocols.PIR.RadiusOneCover: radius-1covers ofD → Boolwith emulation directions.Cslib.Crypto.Protocols.PIR.RadiusOneCover.scheme: the covering-code scheme.Cslib.Crypto.Protocols.PIR.RadiusOneCover.ofHammingDist: the cover of a radius-1covering code.Cslib.Crypto.Protocols.PIR.RadiusOneCover.cubeThree,Cslib.Crypto.Protocols.PIR.RadiusOneCover.cubeFour: the covers of Corollary 2.
Main results #
Cslib.Crypto.Protocols.PIR.RadiusOneCover.isCorrect_scheme,Cslib.Crypto.Protocols.PIR.RadiusOneCover.isPrivate_scheme,Cslib.Crypto.Protocols.PIR.RadiusOneCover.communication_scheme: the covering-code scheme.Cslib.Crypto.Protocols.PIR.RadiusOneCover.communication_scheme_of_balanced: Theorem 1's count for balanced covers.Cslib.Crypto.Protocols.PIR.RadiusOneCover.hasScheme,Cslib.Crypto.Protocols.PIR.RadiusOneCover.hasScheme_of_hammingDist: schemes forn-bit databases.Cslib.Crypto.Protocols.PIR.hasScheme_two_of_le_pow_three,Cslib.Crypto.Protocols.PIR.hasScheme_four_of_le_pow_four: Corollary 2.
References #
- B. Chor, O. Goldreich, E. Kushilevitz, M. Sudan, Private information retrieval, Section 3.3 (Theorem 1, Corollary 2); numbering of the authors' journal version of April 21, 1998
The word produced by the server s and an optional direction r: the codeword code s, or
the codeword with the coordinate dir s r flipped. Exposed so that downstream modules can check
the obligation coveredWord_cover of a concrete cover by decide.
A radius-1 cover of the cube D → Bool by the servers S
CGKS, Section 3.3. The server s has the codeword code s
and emulates the neighbours of code s in the directions dir s r, for r : M. Every word is
produced by the server and the optional direction that cover assigns to it.
- code : S → D → Bool
The codeword of each server.
- dir : S → M → D
The directions of the neighbours that each server emulates.
The server, and possibly the direction, that produce each word.
Each word is produced by its assigned server and direction.
The volume bound CGKS, Section 3.3: a server and its
|M| emulated neighbours produce at most |M| + 1 words, so 2 ^ d ≤ |S| (|M| + 1).
The scheme #
The answer of the 2 ^ d-server scheme that the user reads for the word produced by the
server s and the optional direction r: the answer bit of s itself, or the emulated answer
for the position j of the flipped coordinate.
The covering-code scheme CGKS, Section 3.3. The
server s receives the query of PIR.cube for the server code s. It answers with the answer
bit of PIR.cube and, for each direction l = dir s r and each position k : ι, with the answer
of PIR.cube to the query with e_k added to its l-th set. The user reads the answer of every
server of PIR.cube from the emulating server and adds them.
The server s of the covering-code scheme receives the query of the server code s of
PIR.cube.
The covering-code scheme is private CGKS, Section 3.3:
its queries are those of PIR.cube.
The covering-code scheme is correct CGKS, Section 3.3:
the user reads the answer of every server of PIR.cube.
The covering-code scheme sends d sets of ℓ bits to each of the k servers and receives
1 + m ℓ bits from each, in the fixed-length measure: k ((d + m) ℓ + 1) bits.
Theorem 1's count for balanced covers CGKS, Theorem 1:
when the k servers and their m emulated neighbours each produce exactly the 2 ^ d words,
k (m + 1) = 2 ^ d, the scheme communicates k + (2 ^ d + (d - 1) k) ℓ bits. (Balanced is a
property of the cover, not the source's balancing of user and server communication.)
Schemes from radius-1 covers CGKS, Section 3.3:
with a cover of D → Bool by k servers each emulating m neighbours, every n ≤ ℓ ^ d has a
perfectly correct and perfectly private k-server scheme for n-bit databases communicating
k ((d + m) ℓ + 1) bits.
Covers from covering codes #
The cover of a radius-1 covering code c : S → D → Bool in which every server emulates all
its neighbours: each word is assigned a codeword within distance 1 and the coordinate where
they differ, if any.
Schemes from radius-1 covering codes
CGKS, Section 3.3: if every word of D → Bool is within
Hamming distance 1 of one of k codewords, every n ≤ ℓ ^ d has a perfectly correct and
perfectly private k-server scheme for n-bit databases communicating k (2 d ℓ + 1) bits. Each
server emulates all d neighbours of its codeword. This matches Theorem 1's
k + (2 ^ d + (d - 1) k) ℓ when the code is perfect, k (d + 1) = 2 ^ d, and exceeds it by
(k (d + 1) - 2 ^ d) ℓ in general.
The covers of Corollary 2 #
The repetition code {000, 111} covers the cube Fin 3 → Bool with radius 1
CGKS, Section 3.3. Each codeword emulates its three
neighbours, so the cover is balanced: 2 (3 + 1) = 2 ^ 3.
The code {0000, 1111, 1000, 0111} covers the cube Fin 4 → Bool with radius 1
CGKS, Section 3.3. The codeword of (a, b) is a b b b, and
each codeword emulates its neighbours in the last three coordinates, so the cover is balanced:
4 (3 + 1) = 2 ^ 4.
Two servers with 12 ℓ + 2 bits CGKS, Corollary 2:
every n ≤ ℓ ^ 3 has a perfectly correct and perfectly private two-server scheme for n-bit
databases communicating 12 ℓ + 2 bits. With ℓ = ⌈n ^ (1/3)⌉ this is the source's
12 n ^ (1/3) + 2.
Four servers with 28 ℓ + 4 bits CGKS, Corollary 2:
every n ≤ ℓ ^ 4 has a perfectly correct and perfectly private four-server scheme for n-bit
databases communicating 28 ℓ + 4 bits. With ℓ = ⌈n ^ (1/4)⌉ this is the source's
28 n ^ (1/4) + 4.