aboutsummaryrefslogtreecommitdiff
path: root/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto.h')
-rw-r--r--crypto.h64
1 files changed, 27 insertions, 37 deletions
diff --git a/crypto.h b/crypto.h
index 87e4c65..a7b06d8 100644
--- a/crypto.h
+++ b/crypto.h
@@ -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 --- */