Cingulata
Cingulata copied to clipboard
in the beow program array encrypting up to a[4][0] after giving incorrect at decryption side
int main(int argc, char* argv[]) { if (argc < 3) { cerr << "Usage: " << argv[0] << " " << endl; exit(-1); }
int64_t a[13][2]= {{0,1},{1,2},{2,7},{3,20},{4,54},{5,148},{6,403},{7,1096},{8,2980},{9,8103},{10,30},{20,40},{30,50}}; int64_t exp; CiInt zero{0, 64, false};
CiContext::set_bit_exec(make_shared<TfheBitExec>("tfhe.sk", TfheBitExec::Secret));
CiInt num{exp, 64, false}; vector<vector<CiInt>> X(13, vector<CiInt>{2,64,false});
cout<<"enter a value to compute exponent";
cin>>exp;
zero.encrypt().write("zero");
num.encrypt().write("num");
// n.encrypt().write("n");
for(int i=0;i<13;i++)
{
for(int j=0;j<2;j++)
{
X[i][j]=a[i][j];
X[i][j].encrypt().write("x"+to_string(i)+to_string(j));
}
}
cout<<"encryption completed";