Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
nullclient.h
1 // Percy++ Copyright 2007,2012,2013,2014
2 // Ian Goldberg <iang@cs.uwaterloo.ca>,
3 // Casey Devet <cjdevet@uwaterloo.ca>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of version 2 of the GNU General Public License as
7 // published by the Free Software Foundation.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // There is a copy of the GNU General Public License in the COPYING file
15 // packaged with this plugin; if you cannot find it, write to the Free
16 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 // 02110-1301 USA
18 
19 #ifndef __NULLCLIENT_H__
20 #define __NULLCLIENT_H__
21 
22 #include <NTL/ZZ.h>
23 #include "percyclient.h"
24 #include "percyparams.h"
25 
26 NTL_CLIENT
27 
30 
31 class NullClient : public PercyClient {
32 public:
37  NullClient (const PercyClientParams * params, nservers_t num_servers);
38 
40  virtual ~NullClient ();
41 
42 private:
43  const PercyParams * params;
44 
45  // Virtual members as described in PercyClient class
46  virtual void encode_request_impl (nqueries_t request_identifier);
47  virtual dbsize_t send_request_impl (nqueries_t request_identifier,
48  vector<ostream*> &osvec, bool send_num_queries = true);
49  virtual dbsize_t receive_replies_impl (nqueries_t request_identifier,
50  vector<istream*> &isvec);
51  virtual nqueries_t process_replies_impl (nservers_t h,
52  vector<vector<PercyResult> >& results);
53 
54  unsigned char * randbuf;
55  nqueries_t num_to_process;
56 };
57 
58 #endif
NullClient(const PercyClientParams *params, nservers_t num_servers)
Constructor.
Client parameters.
Definition: percyparams.h:189
virtual ~NullClient()
Destructor.
nservers_t num_servers
The number of servers.
Definition: percyclient.h:183
An abstract base class for a protocol's parameters.
Definition: percyparams.h:80
A PIR client that does nothing except send random data to the servers and receive the responses...
Definition: nullclient.h:31
An abstract base class for a PIR client.
Definition: percyclient.h:35
Defines the basic structure of protocol parameters (PercyParams), client parameters (PercyClientParam...