+2
-2
crypto/sha512_generic.c
+2
-2
crypto/sha512_generic.c
···
78
78
79
79
static inline void BLEND_OP(int I, u64 *W)
80
80
{
81
-
W[I % 16] += s1(W[(I-2) % 16]) + W[(I-7) % 16] + s0(W[(I-15) % 16]);
81
+
W[I & 15] += s1(W[(I-2) & 15]) + W[(I-7) & 15] + s0(W[(I-15) & 15]);
82
82
}
83
83
84
84
static void
···
105
105
106
106
#define SHA512_16_79(i, a, b, c, d, e, f, g, h) \
107
107
BLEND_OP(i, W); \
108
-
t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)%16]; \
108
+
t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)&15]; \
109
109
t2 = e0(a) + Maj(a, b, c); \
110
110
d += t1; \
111
111
h = t1 + t2