From: Rudolf Polzer Date: Thu, 2 Sep 2010 06:09:10 +0000 (+0200) Subject: more bugfixes, SSL variant works now X-Git-Tag: xonotic-v0.1.0preview~28 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2df635bb1dc3925aa10c35ef4a91239eb93dc7ff;p=xonotic%2Fd0_blind_id.git more bugfixes, SSL variant works now --- diff --git a/d0_bignum-openssl.c b/d0_bignum-openssl.c index 9e45f7f..1dcec87 100644 --- a/d0_bignum-openssl.c +++ b/d0_bignum-openssl.c @@ -210,7 +210,7 @@ d0_bignum_t *d0_bignum_shl(d0_bignum_t *r, const d0_bignum_t *a, ssize_t n) if(n > 0) BN_lshift(&r->z, &a->z, n); else if(n < 0) - BN_rshift(&r->z, &a->z, n); + BN_rshift(&r->z, &a->z, -n); else if(r != a) BN_copy(&r->z, &a->z); return r; diff --git a/d0_blind_id.c b/d0_blind_id.c index acebb5d..87f603b 100644 --- a/d0_blind_id.c +++ b/d0_blind_id.c @@ -747,18 +747,8 @@ WARN_UNUSED_RESULT BOOL d0_blind_id_authenticate_with_private_id_start(d0_blind_ CHECK_ASSIGN(ctx->t, d0_bignum_rand_range(ctx->t, zero, temp0)); // can we SOMEHOW do this with just one mod_pow? -#pragma omp parallel default(shared) reduction(||:failed) -#pragma omp sections - { -#pragma omp section - { - MPCHECK(d0_bignum_mod_pow(temp0, four, ctx->r, ctx->schnorr_G)); - } -#pragma omp section - { - MPCHECK_ASSIGN(ctx->g_to_t, d0_bignum_mod_pow(ctx->g_to_t, four, ctx->t, ctx->schnorr_G)); - } - } + MPCHECK(d0_bignum_mod_pow(temp0, four, ctx->r, ctx->schnorr_G)); + MPCHECK_ASSIGN(ctx->g_to_t, d0_bignum_mod_pow(ctx->g_to_t, four, ctx->t, ctx->schnorr_G)); CHECK(!failed); // hash it, hash it, everybody hash it