sha3: Fix readLane() macro on big-endian platforms
authorTobias Brunner <tobias@strongswan.org>
Thu, 16 Jan 2020 15:06:27 +0000 (16:06 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 20 Jan 2020 10:05:17 +0000 (11:05 +0100)
src/libstrongswan/plugins/sha3/sha3_keccak.c

index 1be1db1..4513ee1 100644 (file)
@@ -143,7 +143,7 @@ static void xor64(uint8_t *x, uint64_t u)
     #define writeLane(i, lane)   (((uint64_t*)state)[i])  = (lane)
     #define XORLane(i, lane)     (((uint64_t*)state)[i]) ^= (lane)
 #elif BYTE_ORDER == BIG_ENDIAN
-    #define readLane(i)          load64((uint8_t*)state+sizeof(uint64_t)*i))
+    #define readLane(i)          load64((uint8_t*)state+sizeof(uint64_t)*i)
     #define writeLane(i, lane)   store64((uint8_t*)state+sizeof(uint64_t)*i, lane)
     #define XORLane(i, lane)     xor64((uint8_t*)state+sizeof(uint64_t)*i, lane)
 #endif