Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in the beow program array encrypting up to a[4][0] after giving incorrect at decryption side #27

Open
bpradeep508 opened this issue Mar 17, 2020 · 0 comments

Comments

@bpradeep508
Copy link

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> X(13, vector{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";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant