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:

Goldberg's IT-PIR protocol (2007) over the integers modulo p
Goldberg's IT-PIR protocol (2007) over GF(2^E)
Chor et al.'s IT-PIR protocol (1995)
Aguilar Melchor and Gaborit's CPIR protocol (2007)
Aguilar Melchor and Gaborit's CPIR protocol (2007) with recursion
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.


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

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


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.