diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-21 16:12:57 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-21 16:12:57 +0200 |
commit | 77f396003c6792c3cad8b41b19dd9e8d9435198c (patch) | |
tree | e7d5085c86564e3b3b1a80e5a25f9c80ff3a835c /crypto.h | |
parent | 24191a69683ca8fb7d01c26ec889f13a3f7d8ba8 (diff) |
use hash to generate challange in ZKPs
Diffstat (limited to 'crypto.h')
-rw-r--r-- | crypto.h | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -62,16 +62,25 @@ void ec_keypair_create_base (gcry_mpi_point_t pkey, /* --- Zero knowledge proofs --- */ +struct proof_dl { + struct ec_mpi r; + struct ec_mpi a; +}; + +struct proof_2dle { + struct ec_mpi r; + struct ec_mpi a; + struct ec_mpi b; +}; + void smc_zkp_dl (const gcry_mpi_point_t v, const gcry_mpi_point_t g, const gcry_mpi_t x, const gcry_mpi_point_t a, - gcry_mpi_t c, gcry_mpi_t r); int smc_zkp_dl_check (const gcry_mpi_point_t v, const gcry_mpi_point_t g, const gcry_mpi_point_t a, - const gcry_mpi_t c, const gcry_mpi_t r); void smc_zkp_2dle (const gcry_mpi_point_t v, @@ -81,7 +90,6 @@ void smc_zkp_2dle (const gcry_mpi_point_t v, const gcry_mpi_t x, gcry_mpi_point_t a, gcry_mpi_point_t b, - gcry_mpi_t c, gcry_mpi_t r); int smc_zkp_2dle_check (const gcry_mpi_point_t v, const gcry_mpi_point_t w, @@ -89,7 +97,6 @@ int smc_zkp_2dle_check (const gcry_mpi_point_t v, const gcry_mpi_point_t g2, const gcry_mpi_point_t a, const gcry_mpi_point_t b, - const gcry_mpi_t c, const gcry_mpi_t r); void smc_zkp_0og (gcry_mpi_point_t alpha, @@ -100,7 +107,6 @@ void smc_zkp_0og (gcry_mpi_point_t alpha, gcry_mpi_point_t a2, gcry_mpi_point_t b1, gcry_mpi_point_t b2, - gcry_mpi_t c, gcry_mpi_t d1, gcry_mpi_t d2, gcry_mpi_t r1, @@ -112,7 +118,6 @@ int smc_zkp_0og_check (const gcry_mpi_point_t alpha, const gcry_mpi_point_t a2, const gcry_mpi_point_t b1, const gcry_mpi_point_t b2, - const gcry_mpi_t c, const gcry_mpi_t d1, const gcry_mpi_t d2, const gcry_mpi_t r1, |