Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PercyHybridClient Class Reference
Inheritance diagram for PercyHybridClient:
PercyClient

Public Member Functions

 PercyHybridClient (const HybridClientParams *params, nservers_t num_servers, nservers_t t, sid_t *sids=NULL, PercyStats *stats=NULL)
 
- Public Member Functions inherited from PercyClient
virtual ~PercyClient ()
 Destructor. More...
 
nqueries_t encode_request (vector< dbsize_t > block_numbers, nqueries_t querybsize=1)
 Encode a request for the given block numbers. More...
 
dbsize_t send_request (nqueries_t request_identifier, std::vector< ostream * > &osvec, bool send_num_queries=true)
 Send the request for the given request ID. More...
 
dbsize_t receive_replies (nqueries_t request_identifier, std::vector< istream * > &isvec)
 Receive the servers' replies for a given request ID. More...
 
nqueries_t process_replies (nservers_t h)
 Process the servers' replies for all undecoded replies. More...
 
bool get_result (nqueries_t request_identifier, vector< PercyBlockResults > &results)
 Get the result for a given request ID. More...
 
bool fetch_blocks (nqueries_t &request_identifier, vector< dbsize_t > block_numbers, vector< ostream * > &osvec, vector< istream * > &isvec, vector< PercyBlockResults > &results, nqueries_t querybsize=1)
 Do encode_request(), send_request(), receive_replies(), process_replies(), and get_result() all in one shot. More...
 

Protected Member Functions

virtual void encode_request_impl (nqueries_t request_identifier)
 Implementation for encode_request(). More...
 
virtual dbsize_t send_request_impl (nqueries_t request_identifier, vector< ostream * > &osvec)
 
virtual dbsize_t receive_replies_impl (nqueries_t request_identifier, vector< istream * > &isvec)
 Implementation for encode_request(). More...
 
virtual nqueries_t process_replies_impl (nservers_t h, vector< vector< PercyResult > > &results)
 Implementation for encode_request(). More...
 
- Protected Member Functions inherited from PercyClient
const vector< dbsize_t > & get_block_numbers (nqueries_t request_identifier)
 Get the block numbers for a given request ID. More...
 
nqueries_t get_qbs (nqueries_t request_identifier)
 Get the number of blocks to request in a single query for a given request ID. More...
 
virtual dbsize_t send_request_impl (nqueries_t request_identifier, vector< ostream * > &osvec, bool send_num_queries=true)=0
 Implementation for send_request(). More...
 
 PercyClient (const PercyClientParams *clientparams, nservers_t num_servers, nservers_t t, PercyStats *stats=NULL)
 Constructor. More...
 

Protected Attributes

const HybridClientParams * params
 
nservers_t num_servers
 
const PercyClientParamsit_params
 
const AGClientParams & c_params
 
PercyClientit_client
 
PercyClientc_client
 
map< nqueries_t, nqueries_t > it_req_ids
 
map< nqueries_t, nqueries_t > c_req_ids
 
- Protected Attributes inherited from PercyClient
const PercyClientParamsclientparams
 Parameters for the client. More...
 
nservers_t num_servers
 The number of servers. More...
 
nservers_t t
 The privacy level. More...
 
vector< nservers_t > goodservers
 The server indices of servers that have not acted up. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from PercyClient
static PercyClientmake_client (const PercyClientParams *clientparams, nservers_t num_servers, nservers_t t, sid_t *sids=NULL, PercyStats *stats=NULL)
 Factory method called to get a client object for the given parameters. More...
 
- Static Protected Attributes inherited from PercyClient
static const bool randomize = true
 Randomize the requests for IT-PIR clients. More...
 

Member Function Documentation

virtual void encode_request_impl ( nqueries_t  request_identifier)
protectedvirtual

Implementation for encode_request().

Parameters
request_identifierRequest ID.

Implements PercyClient.

virtual nqueries_t process_replies_impl ( nservers_t  h,
vector< vector< PercyResult > > &  results 
)
protectedvirtual

Implementation for encode_request().

Parameters
hThe number of honest servers.
resultsWill be filled with the results for all requests for which a reply has been received received.
Returns
The number of queries that we not successfully decoded.

Implements PercyClient.

virtual dbsize_t receive_replies_impl ( nqueries_t  request_identifier,
vector< istream * > &  isvec 
)
protectedvirtual

Implementation for encode_request().

Parameters
request_identifierRequest ID.
isvecStreams for input from the servers.
Returns
The total bytes received (from all servers combined)

Implements PercyClient.


The documentation for this class was generated from the following file: