Skip to content
Permalink
Browse files

slow-hash: fix CNv2+ on big endian

  • Loading branch information...
moneromooo-monero committed May 14, 2019
1 parent 71b5998 commit 3e62bfb3f2138c23ad3aec3dfd50389a42df44ed
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/crypto/slow-hash.c
@@ -137,8 +137,8 @@ static inline int use_v4_jit(void)
{ \
U64(b)[2] = state.hs.w[8] ^ state.hs.w[10]; \
U64(b)[3] = state.hs.w[9] ^ state.hs.w[11]; \
division_result = state.hs.w[12]; \
sqrt_result = state.hs.w[13]; \
division_result = SWAP64LE(state.hs.w[12]); \
sqrt_result = SWAP64LE(state.hs.w[13]); \
} while (0)

#define VARIANT2_PORTABLE_INIT() \
@@ -211,7 +211,7 @@ static inline int use_v4_jit(void)
uint64_t b0[2]; \
memcpy_swap64le(b0, b, 2); \
chunk2[0] = SWAP64LE(chunk1_old[0] + b0[0]); \
chunk2[1] = SWAP64LE(SWAP64LE(chunk1_old[1]) + b0[1]); \
chunk2[1] = SWAP64LE(chunk1_old[1] + b0[1]); \
if (variant >= 4) \
{ \
uint64_t out_copy[2]; \

0 comments on commit 3e62bfb

Please sign in to comment.
You can’t perform that action at this time.