From e08789c72754944f965a2e3bb4ea2c41f50fa138 Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Fri, 23 Sep 2016 16:31:06 +0200 Subject: fix bug in public first price outcome determination We have to divide out the amount of bidders to get the correct result. --- crypto.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crypto.c') diff --git a/crypto.c b/crypto.c index 600fbb8..b9f55db 100644 --- a/crypto.c +++ b/crypto.c @@ -1191,6 +1191,9 @@ fp_pub_determine_outcome (struct BRANDT_Auction *ad, dlogi = GNUNET_CRYPTO_ecc_dlog (ec_dlogctx, sum_gamma); brandt_assert (dlogi > 0); + /* all bidders participated with a multiplicative share */ + dlogi /= ad->n; + /* can only support up to bits(dlogi) bidders */ brandt_assert (sizeof (int) * 8 - 1 >= ad->n); for (uint16_t i = 0; i < ad->n; i++) -- cgit v1.2.3