19 #ifndef __AGCLIENT_H__
20 #define __AGCLIENT_H__
22 #include <NTL/mat_ZZ_p.h>
23 #include "percyclient.h"
25 #include "percystats.h"
36 vec_ZZ_p Delta_vec_inv;
39 AG_Element * Delta_vec_inv;
42 std::vector<dbsize_t> perm;
68 virtual void encode_request_impl (nqueries_t request_identifier);
69 virtual dbsize_t send_request_impl (nqueries_t request_identifier,
70 vector<ostream*> &osvec,
bool send_num_queries =
true);
71 virtual dbsize_t receive_replies_impl (nqueries_t request_identifier,
72 vector<istream*> &isvec);
73 virtual nqueries_t process_replies_impl (nservers_t h,
74 vector<vector<PercyResult> >& results);
81 void random_ag_elements (AG_Element * buffer, dbsize_t n,
82 bool nonzero =
false);
84 void soft_noise_matrix (AG_Element * M, dbsize_t size);
85 void hard_noise_matrix (AG_Element * M, dbsize_t size);
92 void mult_matrices (AG_Element * results, AG_Element * A, AG_Element * B,
93 dbsize_t rows_A, dbsize_t cols_A, dbsize_t cols_B);
97 bool inv (AG_Element& inv,
const AG_Element& n);
112 bool is_invertible (AG_Element * M, dbsize_t size, AG_Element * aux = NULL,
113 AG_Element * aux2 = NULL);
122 map<nqueries_t, vector<unsigned char *> > queries;
123 map<nqueries_t, vector<AGDecodeInfo> > sentinfo;
125 map<nqueries_t, map<nservers_t, vec_vec_ZZ_p> > stored_answers;
127 map<nqueries_t, map<nservers_t, vector<AG_Element *> > > stored_answers;
Client parameters.
Definition: percyparams.h:189
virtual ~PercyAGClient()
Destructor.
Definition: percystats.h:66
Definition: agclient.h:33
PercyAGClient(const PercyClientParams *params, PercyStats *stats=NULL)
Constructor.
Definition: agparams.h:73
An abstract base class for a PIR client.
Definition: percyclient.h:35
A PIR client for the CPIR protocol by Aguilar Melchor and Gaborit (2007).
Definition: agclient.h:52