diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-21 23:06:15 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-21 23:06:15 +0200 |
commit | 8d717c4b3d126104929aeb5e3a2176dd534e25ea (patch) | |
tree | 65fb80bd331e8ce5991aa723502e7a023cc0b8f6 /crypto.h | |
parent | 584423199339cff2e0ad348df60148672a562fe4 (diff) |
use proof structs. fix bug in mpi_serialize
Diffstat (limited to 'crypto.h')
-rw-r--r-- | crypto.h | 64 |
1 files changed, 27 insertions, 37 deletions
@@ -73,55 +73,45 @@ struct proof_2dle { struct ec_mpi b; }; +struct proof_0og { + struct ec_mpi a1; + struct ec_mpi a2; + struct ec_mpi b1; + struct ec_mpi b2; + struct ec_mpi d1; + struct ec_mpi d2; + struct ec_mpi r1; + struct ec_mpi r2; +}; + 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 r); + struct proof_dl *proof); 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 r); + const struct proof_dl *proof); void smc_zkp_2dle (const gcry_mpi_point_t v, const gcry_mpi_point_t w, const gcry_mpi_point_t g1, const gcry_mpi_point_t g2, const gcry_mpi_t x, - gcry_mpi_point_t a, - gcry_mpi_point_t b, - gcry_mpi_t r); -int smc_zkp_2dle_check (const gcry_mpi_point_t v, - const gcry_mpi_point_t w, - const gcry_mpi_point_t g1, - const gcry_mpi_point_t g2, - const gcry_mpi_point_t a, - const gcry_mpi_point_t b, - const gcry_mpi_t r); - -void smc_zkp_0og (gcry_mpi_point_t alpha, - const gcry_mpi_point_t m, + struct proof_2dle *proof); +int smc_zkp_2dle_check (const gcry_mpi_point_t v, + const gcry_mpi_point_t w, + const gcry_mpi_point_t g1, + const gcry_mpi_point_t g2, + const struct proof_2dle *proof); + +void smc_zkp_0og (int m_is_gen, const gcry_mpi_point_t y, + gcry_mpi_t r, + gcry_mpi_point_t alpha, gcry_mpi_point_t beta, - gcry_mpi_point_t a1, - gcry_mpi_point_t a2, - gcry_mpi_point_t b1, - gcry_mpi_point_t b2, - gcry_mpi_t d1, - gcry_mpi_t d2, - gcry_mpi_t r1, - gcry_mpi_t r2); -int smc_zkp_0og_check (const gcry_mpi_point_t alpha, - const gcry_mpi_point_t y, + struct proof_0og *proof); +int smc_zkp_0og_check (const gcry_mpi_point_t y, + const gcry_mpi_point_t alpha, const gcry_mpi_point_t beta, - const gcry_mpi_point_t a1, - const gcry_mpi_point_t a2, - const gcry_mpi_point_t b1, - const gcry_mpi_point_t b2, - const gcry_mpi_t d1, - const gcry_mpi_t d2, - const gcry_mpi_t r1, - const gcry_mpi_t r2); + const struct proof_0og *proof); /* --- Protocol implementation --- */ |