From 2df635bb1dc3925aa10c35ef4a91239eb93dc7ff Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 2 Sep 2010 08:09:10 +0200 Subject: [PATCH 1/1] more bugfixes, SSL variant works now --- d0_bignum-openssl.c | 2 +- d0_blind_id.c | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) 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 -- 2.39.2