You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by sa...@apache.org on 2020/04/15 08:26:48 UTC
[incubator-milagro-MPC] 07/08: fix examples
This is an automated email from the ASF dual-hosted git repository.
sandreoli pushed a commit to branch review-mike
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-MPC.git
commit 8e2e311580ec0ceb5748caf5957a0402e30a0ca2
Author: Samuele Andreoli <sa...@yahoo.it>
AuthorDate: Tue Apr 14 16:55:41 2020 +0100
fix examples
---
examples/example_bc_setup.c | 3 ++-
examples/example_mta_zk.c | 2 +-
examples/example_mta_zk_interactive.c | 5 +----
examples/example_mta_zkwc.c | 2 +-
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/examples/example_bc_setup.c b/examples/example_bc_setup.c
index b16efb1..21b017e 100644
--- a/examples/example_bc_setup.c
+++ b/examples/example_bc_setup.c
@@ -67,7 +67,7 @@ int main()
printf("\n\tB1 = ");
FF_2048_output(m.b1, FFLEN_2048);
- printf("Clear secret values from the modulus");
+ printf("\n\nClear secret values from the modulus");
COMMITMENTS_BC_kill_priv_modulus(&m);
printf("\n\tP = ");
@@ -86,6 +86,7 @@ int main()
FF_2048_output(m.b0, FFLEN_2048);
printf("\n\tB1 = ");
FF_2048_output(m.b1, FFLEN_2048);
+ printf("\n");
// Clean memory
OCT_clear(&P);
diff --git a/examples/example_mta_zk.c b/examples/example_mta_zk.c
index d67ee41..1aaf937 100644
--- a/examples/example_mta_zk.c
+++ b/examples/example_mta_zk.c
@@ -116,7 +116,7 @@ int main()
PAILLIER_KEY_PAIR(NULL, &P, &Q, &pub_key, &priv_key);
- printf("Run MTA Range Proof\nParameters:\n");
+ printf("Run MTA ZK Proof\nParameters:\n");
printf("\tPaillier Key\n");
printf("\t\tP = ");
OCT_output(&P);
diff --git a/examples/example_mta_zk_interactive.c b/examples/example_mta_zk_interactive.c
index 6729f8f..2a94eec 100644
--- a/examples/example_mta_zk_interactive.c
+++ b/examples/example_mta_zk_interactive.c
@@ -121,7 +121,7 @@ int main()
PAILLIER_KEY_PAIR(NULL, &P, &Q, &pub_key, &priv_key);
- printf("Run MTA Range Proof\nParameters:\n");
+ printf("Run MTA interactive ZK Proof\nParameters:\n");
printf("\tPaillier Key\n");
printf("\t\tP = ");
OCT_output(&P);
@@ -230,9 +230,6 @@ int main()
MTA_ZK_proof_fromOctets(&proof, &S, &S1, &S2, &T1, &T2);
MTA_ZK_commitment_fromOctets(&c, &Z, &Z1, &T, &V, &W);
- // Verifier - compute deterministic challenge
- MTA_ZK_challenge(&pub_key, &pub_mod, &C1, &C2, &c, &E);
-
printf("\n[Verifier] Verification\n");
rc = MTA_ZK_verify(&priv_key, &priv_mod, &C1, &C2, &E, &c, &proof);
diff --git a/examples/example_mta_zkwc.c b/examples/example_mta_zkwc.c
index 28781a3..b40283a 100644
--- a/examples/example_mta_zkwc.c
+++ b/examples/example_mta_zkwc.c
@@ -125,7 +125,7 @@ int main()
PAILLIER_KEY_PAIR(NULL, &P, &Q, &pub_key, &priv_key);
- printf("Run MTA Range Proof\nParameters:\n");
+ printf("Run MTA ZK Proof with check\nParameters:\n");
printf("\tPaillier Key\n");
printf("\t\tP = ");
OCT_output(&P);