From: Rudolf Polzer Date: Fri, 9 Dec 2011 11:44:14 +0000 (+0100) Subject: improve temp use X-Git-Tag: v0.5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bade7078a3cf0e79bc7dcfbad8df6abd246251eb;p=xonotic%2Fd0_blind_id.git improve temp use --- diff --git a/d0_blind_id.c b/d0_blind_id.c index 57ca8fd..f1cd22e 100644 --- a/d0_blind_id.c +++ b/d0_blind_id.c @@ -1442,13 +1442,12 @@ fail: D0_WARN_UNUSED_RESULT D0_BOOL d0_blind_id_verify_private_id(const d0_blind_id_t *ctx) { - USINGTEMPS(); // temps: temp0 = order, temp1 = g^s + USINGTEMPS(); // temps: temp0 = g^s USING(schnorr_G); USING(schnorr_s); USING(schnorr_g_to_s); LOCKTEMPS(); - CHECK(d0_dl_get_order(temp0, ctx->schnorr_G)); - CHECK(d0_bignum_mod_pow(temp1, four, ctx->schnorr_s, ctx->schnorr_G)); - CHECK(!d0_bignum_cmp(temp1, ctx->schnorr_g_to_s)); + CHECK(d0_bignum_mod_pow(temp0, four, ctx->schnorr_s, ctx->schnorr_G)); + CHECK(!d0_bignum_cmp(temp0, ctx->schnorr_g_to_s)); UNLOCKTEMPS(); return 1;