Browse Source

main encrypts 0

tristangurtler 3 years ago
parent
commit
583211f2f6
1 changed files with 20 additions and 20 deletions
  1. 20 20
      bgn2/src/main.cpp

+ 20 - 20
bgn2/src/main.cpp

@@ -8,7 +8,7 @@ int main(void)
 
     // const PrivateKey sk = system.get_private_key();
 
-    Scalar test3(3);
+    Scalar test3(0);
     Scalar test5(5);
     Scalar decrypted3, decrypted5, decrypted6, decrypted10, decrypted15, decrypted30;
 
@@ -32,40 +32,40 @@ int main(void)
     // std::cout << std:: endl;
     // std::cout << "What it should match up to (3): " << pi_1_curvegen_times3 << std::endl;
     // std::cout << std:: endl;
-    system.encrypt(encrypted5, test5);
+    // system.encrypt(encrypted5, test5);
 
-    std::cout << "Performing additions" << std::endl;
+    // std::cout << "Performing additions" << std::endl;
 
-    encrypted6 = system.homomorphic_addition(encrypted3, encrypted3);
-    encrypted10 = system.homomorphic_addition(encrypted5, encrypted5);
+    // encrypted6 = system.homomorphic_addition(encrypted3, encrypted3);
+    // encrypted10 = system.homomorphic_addition(encrypted5, encrypted5);
 
-    std::cout << "Performing multiplication" << std::endl;
+    // std::cout << "Performing multiplication" << std::endl;
 
-    encrypted15 = system.homomorphic_multiplication(encrypted3, encrypted5);
+    // encrypted15 = system.homomorphic_multiplication(encrypted3, encrypted5);
 
-    std::cout << "Performing L2 addition" << std::endl;
+    // std::cout << "Performing L2 addition" << std::endl;
 
-    encrypted30 = system.homomorphic_addition(encrypted15, encrypted15);
+    // encrypted30 = system.homomorphic_addition(encrypted15, encrypted15);
 
-    std::cout << "Performing decryptions" << std::endl;
+    // std::cout << "Performing decryptions" << std::endl;
 
     decrypted3  = system.decrypt(encrypted3);
     std::cout << "Scalar decrypted value (3):   " << decrypted3  << std::endl;
 
-    decrypted5  = system.decrypt(encrypted5);
-    std::cout << "Scalar decrypted value (5):   " << decrypted5  << std::endl;
+    // decrypted5  = system.decrypt(encrypted5);
+    // std::cout << "Scalar decrypted value (5):   " << decrypted5  << std::endl;
 
-    decrypted6  = system.decrypt(encrypted6);
-    std::cout << "Scalar decrypted value (6):   " << decrypted6  << std::endl;
+    // decrypted6  = system.decrypt(encrypted6);
+    // std::cout << "Scalar decrypted value (6):   " << decrypted6  << std::endl;
 
-    decrypted10 = system.decrypt(encrypted10);
-    std::cout << "Scalar decrypted value (10): "  << decrypted10 << std::endl;
+    // decrypted10 = system.decrypt(encrypted10);
+    // std::cout << "Scalar decrypted value (10): "  << decrypted10 << std::endl;
 
-    decrypted15 = system.decrypt(encrypted15);
-    std::cout << "Scalar decrypted value (15): "  << decrypted15 << std::endl;
+    // decrypted15 = system.decrypt(encrypted15);
+    // std::cout << "Scalar decrypted value (15): "  << decrypted15 << std::endl;
 
-    decrypted30 = system.decrypt(encrypted30);
-    std::cout << "Scalar decrypted value (30): "  << decrypted30 << std::endl;
+    // decrypted30 = system.decrypt(encrypted30);
+    // std::cout << "Scalar decrypted value (30): "  << decrypted30 << std::endl;
 
     return 0;
 }