]> git.rm.cloudns.org Git - xonotic/d0_blind_id.git/commitdiff
more bugfixes, SSL variant works now
authorRudolf Polzer <divverent@alientrap.org>
Thu, 2 Sep 2010 06:09:10 +0000 (08:09 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 2 Sep 2010 06:09:10 +0000 (08:09 +0200)
d0_bignum-openssl.c
d0_blind_id.c

index 9e45f7f329ab0a02a1679bd27cc425896e01b1ba..1dcec8780775e5afcc6ffd7dca00ce3f95afa00f 100644 (file)
@@ -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;
index acebb5dd32232e22799dc124e080b70fcb3cf91a..87f603b8b5fe41c130e04f0ada9950a34ed5f003 100644 (file)
@@ -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