Skip to content
Snippets Groups Projects
Commit a1c5e9a4 authored by Weiqi's avatar Weiqi
Browse files

done

parent 650e6239
Branches
No related tags found
No related merge requests found
...@@ -81,18 +81,17 @@ void eval(struct key key, struct ct x, struct ct y, int size) { ...@@ -81,18 +81,17 @@ void eval(struct key key, struct ct x, struct ct y, int size) {
gt_inv(ct, ct); gt_inv(ct, ct);
gt_mul(xy, xy, ct); gt_mul(xy, xy, ct);
// // Check correctness. // Check correctness.
// gt desired_output; gt desired_output;
// gt_exp_dig(desired_output, key.t_base, 55); gt_exp_dig(desired_output, key.t_base, 65);
// if (gt_cmp(desired_output, xy) == RLC_EQ) printf("Magic happened");
// if (gt_cmp(desired_output, xy) == RLC_EQ) printf("Magic happened");
} }
int main() { int main() {
// Initialize relic. // Initialize relic.
initialize_relic(); initialize_relic();
// Set x, y vectors. // Set x, y vectors.
int x[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; int x[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 2};
int y[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int y[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
// Initialize the scheme. // Initialize the scheme.
struct key key = setup(10); struct key key = setup(10);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment