github.com/jiajun1992/watercarver@v0.0.0-20191031150618-dfc2b17c0c4a/StadiumForWaterCarver/src/NIZKProof.h (about)

     1  #ifndef __NIZK_PROOF_H__
     2  #define __NIZK_PROOF_H__
     3  
     4  #include "FakeZZ.h"
     5  #include <string>
     6  #include <sstream>
     7  
     8  using namespace std;
     9  NTL_CLIENT
    10  
    11  class NIZKProof {
    12  public:
    13  	NIZKProof() {}
    14  	NIZKProof(NIZKProof& other) : proof_(other.proof()) {}
    15  	NIZKProof(string ser);
    16  	
    17  	void add_new_step(string& input_to_ver, ZZ& challenge, ZZ& rand);
    18  	void add_final_step(string& input_to_ver);
    19  	void read_next(string& input_to_ver, ZZ& challenge, ZZ& rand);
    20  	void read_final_step(string& input_to_ver);
    21  	string proof() { return proof_.str(); }
    22  private:
    23  	void write_str(string& s);
    24  	string read_str();
    25  	void write_ZZ(ZZ& n);
    26  	ZZ read_ZZ();
    27  	stringstream proof_;
    28  };
    29  
    30  #endif