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

     1  /*
     2   * multi_expo.h
     3   *
     4   *  Created on: 02.07.2012
     5   *      Author: stephaniebayer
     6   */
     7  
     8  #ifndef MULTI_EXPO_H_
     9  #define MULTI_EXPO_H_
    10  
    11  
    12  #include<vector>
    13  #include "G_q.h"
    14  #include "FakeZZ.h"
    15  #include "Mod_p.h"
    16  #include "Cipher_elg.h"
    17  #include "Permutation.h"
    18  NTL_CLIENT
    19  
    20  
    21  class multi_expo {
    22  public:
    23  	multi_expo();
    24  	virtual ~multi_expo();
    25  
    26  
    27  	static vector<vector<int>* >* to_binary(int win);
    28  	static long to_long(vector<int>* bit_r);
    29  	static void to_long(long& t, vector<int>* bit_r);
    30  	static vector<long>* to_basis(ZZ e, long num_b, int omega);
    31  	static vector<vector<vector<long>* >* >* to_basis_vec(vector<vector<ZZ>* >* T, long num_b, int omega);
    32  
    33  	static void expo_mult(CurvePoint& ret, const vector<ZZ>* e, ZZ ran, int omega_expo, vector<Mod_p>* gen);
    34  	static void expo_mult(Cipher_elg& ret, const vector<Cipher_elg>* a, vector<ZZ>* e, int omega );
    35  	static void expo_mult(Cipher_elg& ret, const vector<Cipher_elg>* a, ZZ f, vector<ZZ>* e, int omega );
    36  	static void expo_mult(Cipher_elg& ret, const vector<Cipher_elg>* a, vector<vector<long>*>* e, int omega );
    37  	static void expo_mult(Cipher_elg& ret, const vector<vector<Cipher_elg>*>* a, vector<ZZ>* s1, vector<ZZ>* s2, int omega );
    38  
    39  	static vector<vector<CurvePoint>* >* calc_Yk(vector<CurvePoint>* y, int win);
    40  	static vector<vector<Mod_p>* >* calc_Yk(vector<Mod_p>* y, int win);
    41  
    42  	static void multi_expo_LL(Mod_p& ret, vector<Mod_p>* y, vector<ZZ>* e, int win);
    43  	static void multi_expo_LL(CurvePoint& ret, vector<CurvePoint>* y, vector<ZZ>* e, int win);
    44  	static void multi_expo_LL(Cipher_elg& ret, Cipher_elg c1, Cipher_elg c2, Cipher_elg c3, Cipher_elg c4 , vector<ZZ>* e, int win);
    45  
    46  	static vector<int>* to_basis_sw(ZZ e, long num_b, int omega_sw);
    47  	static void multi_expo_sw(CurvePoint& ret, ZZ e_1, ZZ e_2, int omega_sw,  vector<vector<CurvePoint>* >* gen_prec);
    48  };
    49  
    50  #endif /* MULTI_EXPO_H_ */