From a1c5e9a4e62e5bbe00501c623e99f55aadcedbb3 Mon Sep 17 00:00:00 2001
From: Weiqi <weltch1997@gmail.com>
Date: Wed, 1 Mar 2023 20:49:46 -0500
Subject: [PATCH] done
---
apps/scheme.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/apps/scheme.c b/apps/scheme.c
index 2c4d9dd..a071ac6 100644
--- a/apps/scheme.c
+++ b/apps/scheme.c
@@ -81,18 +81,17 @@ void eval(struct key key, struct ct x, struct ct y, int size) {
gt_inv(ct, ct);
gt_mul(xy, xy, ct);
-// // Check correctness.
-// gt desired_output;
-// gt_exp_dig(desired_output, key.t_base, 55);
-//
-// if (gt_cmp(desired_output, xy) == RLC_EQ) printf("Magic happened");
+ // Check correctness.
+ gt desired_output;
+ gt_exp_dig(desired_output, key.t_base, 65);
+ if (gt_cmp(desired_output, xy) == RLC_EQ) printf("Magic happened");
}
int main() {
// Initialize relic.
initialize_relic();
// 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};
// Initialize the scheme.
struct key key = setup(10);
@@ -102,4 +101,4 @@ int main() {
// Evaluate the two ciphertexts.
eval(key, ct_x, ct_y, 10);
return 0;
-}
+}
\ No newline at end of file
--
GitLab