Browse Source

Make the output a little more useful

Ian Goldberg 4 years ago
parent
commit
39bf933cd5
2 changed files with 7 additions and 2 deletions
  1. 3 1
      pedersen.cpp
  2. 4 1
      scalarmul.cpp

+ 3 - 1
pedersen.cpp

@@ -65,7 +65,7 @@ int main()
 
   cout << "Number of R1CS constraints: " << constraint_system.num_constraints() << endl;
   cout << "Primary (public) input: " << pb.primary_input() << endl;
-  cout << "Auxiliary (private) input: " << pb.auxiliary_input() << endl;
+//  cout << "Auxiliary (private) input: " << pb.auxiliary_input() << endl;
   cout << "Verification status: " << verified << endl;
 
   ofstream pkfile("pk_pedersen");
@@ -78,5 +78,7 @@ int main()
   pffile << proof;
   pffile.close();
 
+  cout << pb.val(a) << "*G" << " + " << pb.val(b) << "*H = (" << pb.val(outx) << ", " << pb.val(outy) << ")" << endl;
+
   return 0;
 }

+ 4 - 1
scalarmul.cpp

@@ -63,7 +63,7 @@ int main()
 
   cout << "Number of R1CS constraints: " << constraint_system.num_constraints() << endl;
   cout << "Primary (public) input: " << pb.primary_input() << endl;
-  cout << "Auxiliary (private) input: " << pb.auxiliary_input() << endl;
+//  cout << "Auxiliary (private) input: " << pb.auxiliary_input() << endl;
   cout << "Verification status: " << verified << endl;
 
   ofstream pkfile("pk_scalarmul");
@@ -76,5 +76,8 @@ int main()
   pffile << proof;
   pffile.close();
 
+  cout << pb.val(a) << "*G" << " = (" << pb.val(outx) << ", " << pb.val(outy) << ")" << endl;
+
+
   return 0;
 }