github.com/jiajun1992/watercarver@v0.0.0-20191031150618-dfc2b17c0c4a/StadiumForWaterCarver/src/VerifierClient.h (about) 1 #ifndef __VERIFIER_CLIENT_H__ 2 #define __VERIFIER_CLIENT_H__ 3 4 #include <stdio.h> 5 #include <time.h> 6 #include <vector> 7 #include <fstream> 8 9 #include "G_q.h" 10 #include "Functions.h" 11 #include "ElGammal.h" 12 #include "Cipher_elg.h" 13 #include "Permutation.h" 14 #include "Verifier_toom.h" 15 #include "FakeZZ.h" 16 NTL_CLIENT 17 18 class VerifierClient { 19 public: 20 VerifierClient(const vector<long>& config, int m, int n, vector<vector<Cipher_elg>* >* ciphers, vector<vector<Cipher_elg>* >* permuted_ciphers, ElGammal* elgammal, bool owner, bool do_process); 21 ~VerifierClient(); 22 23 void set_public_vector(istringstream& f, long n, int o1, int o2, int o3); 24 bool process_nizk(string nizk); 25 26 27 void print_state() const; 28 double get_time() const { return time_v; } 29 30 string round2(const string& input_file, ZZ* challenge, ZZ* rand); 31 string round4(const string& input_file, ZZ* challenge, ZZ* rand); 32 string round6(const string& input_file, ZZ* challenge, ZZ* rand); 33 string round6red(const string& input_file, ZZ* challenge, ZZ* rand); 34 string round6red_1(const string& input_file, ZZ* challenge, ZZ* rand); 35 string round8(const string& input_file, ZZ* challenge, ZZ* rand); 36 bool round10(const string& input_file); 37 private: 38 39 string round2(const string& input_file, ZZ& challenge, ZZ& rand); 40 string round4(const string& input_file, ZZ& challenge, ZZ& rand); 41 string round6(const string& input_file, ZZ& challenge, ZZ& rand); 42 string round6red(const string& input_file, ZZ& challenge, ZZ& rand); 43 string round6red_1(const string& input_file, ZZ& challenge, ZZ& rand); 44 string round8(const string& input_file, ZZ& challenge, ZZ& rand); 45 bool round10red(const string& input_file); 46 47 vector<long> config_; 48 long m_r; //number of rows after reduction 49 vector<vector<Cipher_elg>* >* c; // contains the original input ciphertexts 50 vector<vector<Cipher_elg>* >* C; //Contains reencryptetd ciphers 51 double time_v; 52 53 Verifier_toom* V; 54 bool owner_; 55 bool do_process_; 56 57 public: 58 bool flow_flag_; 59 }; 60 61 #endif