From e74c6e4f3b819bcebf86704be1f6be05756c9e37 Mon Sep 17 00:00:00 2001 From: Javier Smooth Date: Mon, 27 Jul 2015 04:07:19 -0700 Subject: [PATCH] one more portable slow-hash fix --- src/crypto/slow-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index a517a95..7f2d495 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -37,7 +37,7 @@ #include "hash-ops.h" #include "oaes_lib.h" -#if defined(__x86_64__) +#if 0// defined(__x86_64__) // Optimised code below, uses x86-specific intrinsics, SSE2, AES-NI // Fall back to more portable code is down at the bottom @@ -610,7 +610,7 @@ void cn_slow_hash(const void *data, size_t length, char *hash, int light) { assert(j == e2i(a, MEMORY / (light?2:1) / AES_BLOCK_SIZE)); swap_blocks(a, b); /* Iteration 2 */ - j = e2i(a, MEMORY / AES_BLOCK_SIZE,light); + j = e2i(a, MEMORY / (light?2:1) / AES_BLOCK_SIZE); copy_block(c, &long_state[j * AES_BLOCK_SIZE]); mul(a, c, d); sum_half_blocks(b, d);