From: Rudolf Polzer Date: Tue, 3 Aug 2010 06:46:26 +0000 (+0200) Subject: fix an undefined use of gmp functions X-Git-Tag: xonotic-v0.1.0preview~38^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db3b9bf37efe94ea4fe722d2b23c8c86fc4c16fc;p=xonotic%2Fd0_blind_id.git fix an undefined use of gmp functions --- diff --git a/d0_blind_id.c b/d0_blind_id.c index 614f49a..c71c88b 100644 --- a/d0_blind_id.c +++ b/d0_blind_id.c @@ -921,8 +921,8 @@ WARN_UNUSED_RESULT BOOL d0_blind_id_authenticate_with_private_id_verify(d0_blind // verify schnorr ID scheme // we need 4^r = 4^temp0 (g^s)^-challenge - CHECK(d0_bignum_neg(temp1, ctx->challenge)); - CHECK(d0_bignum_mod_pow(temp2, ctx->schnorr_g_to_s, temp1, ctx->schnorr_G)); + CHECK(d0_bignum_mod_inv(temp1, ctx->schnorr_g_to_s, ctx->schnorr_G)); + CHECK(d0_bignum_mod_pow(temp2, temp1, ctx->challenge, ctx->schnorr_G)); CHECK(d0_bignum_mod_pow(temp1, four, temp0, ctx->schnorr_G)); CHECK_ASSIGN(temp3, d0_bignum_mod_mul(temp3, temp1, temp2, ctx->schnorr_G));