Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
PIR Server

A PIR server hosts a database and processes private requests from clients.

Below we explain the steps necessary to create a PIR server using our interface.

Protocol Parameters

The first step is to create a protocol parameters object with information about our protocol and the database. This protocol parameters object will be an instantiation of one of the classes derived from PercyParams:

ZZ_pParams
Goldberg's IT-PIR protocol (2007) over the integers modulo p
GF2EParams
Goldberg's IT-PIR protocol (2007) over GF(2^E)
ChorParams
Chor et al.'s IT-PIR protocol (1995)
AGParams
Aguilar Melchor and Gaborit's CPIR protocol (2007)
RecursiveAGParams
Aguilar Melchor and Gaborit's CPIR protocol (2007) with recursion
HybridParams
Devet and Goldberg's Hybrid PIR protocol (2014)

Server Parameters

The protocol parameters object is then encapsulated in a server parameters object. This contains information about how the server will handle the computation.

If our protocol parameters object is non-recursive (one of AGParams, ChorParams, GF2EParams, or ZZ_pParams) we create a PercyServerParams object.

Otherwise, our protocol parameters object is recursive (one of HybridParams or RecursiveAGParams) and we create a RecursiveServerParams object.

Database

The next step involves setting up a database object. Using our server parameters object, we create a DataStore object:

DataStore
Used for a database held in a contiguous block of memory
FileDataStore
Used for a database held in a single file

Server

Finally, we create our server object. This is done by passing our server parameters and database to the factory method PercyServer::make_server().

Using the Server

For the server to handle a request from a client, a connection must be established with the client and then the server's PercyServer::handle_request() method can be used to process queries.