aboutsummaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto.c b/crypto.c
index e7397d5..537dd66 100644
--- a/crypto.c
+++ b/crypto.c
@@ -425,6 +425,20 @@ smc_compute_pkey (struct AuctionData *ad)
}
+void
+smc_gen_keyshare (struct AuctionData *ad)
+{
+ uint16_t i;
+
+ ad->y = calloc(ad->n, sizeof(*ad->y));
+ for (i = 0; i < ad->n; i++)
+ ad->y[0] = gcry_mpi_point_new (0);
+
+ ad->x = gcry_mpi_new (0);
+ ec_keypair_create (ad->y[ad->i], ad->x);
+}
+
+
/**
* smc_zkp_dl
*