23 return Add(Add(x, y), z);
26 return Add(Add(x, y), Add(z, w));
29 return Add(Add(x, y, z), Add(w, v));
47 return Xor(Xor(x, y), z);
63 return Xor(z,
And(x, Xor(y, z)));
103 0x00010203UL, 0x0C0D0E0FUL, 0x08090A0BUL,
104 0x04050607UL, 0x00010203UL));
110 0x00010203UL, 0x0C0D0E0FUL, 0x08090A0BUL,
111 0x04050607UL, 0x00010203UL));
134 __m256i w0,
w1,
w2,
w3,
w4,
w5,
w6,
w7,
w8,
w9,
w10,
w11,
w12,
w13,
w14,
137 Round(
a,
b,
c, d,
e,
f,
g,
h, Add(
K(0x428a2f98ul),
w0 =
Read8(
in, 0)));
138 Round(
h,
a,
b,
c, d,
e,
f,
g, Add(
K(0x71374491ul),
w1 =
Read8(
in, 4)));
139 Round(
g,
h,
a,
b,
c, d,
e,
f, Add(
K(0xb5c0fbcful),
w2 =
Read8(
in, 8)));
140 Round(
f,
g,
h,
a,
b,
c, d,
e, Add(
K(0xe9b5dba5ul),
w3 =
Read8(
in, 12)));
141 Round(
e,
f,
g,
h,
a,
b,
c, d, Add(
K(0x3956c25bul),
w4 =
Read8(
in, 16)));
142 Round(d,
e,
f,
g,
h,
a,
b,
c, Add(
K(0x59f111f1ul),
w5 =
Read8(
in, 20)));
143 Round(
c, d,
e,
f,
g,
h,
a,
b, Add(
K(0x923f82a4ul),
w6 =
Read8(
in, 24)));
144 Round(
b,
c, d,
e,
f,
g,
h,
a, Add(
K(0xab1c5ed5ul),
w7 =
Read8(
in, 28)));
145 Round(
a,
b,
c, d,
e,
f,
g,
h, Add(
K(0xd807aa98ul),
w8 =
Read8(
in, 32)));
146 Round(
h,
a,
b,
c, d,
e,
f,
g, Add(
K(0x12835b01ul),
w9 =
Read8(
in, 36)));
147 Round(
g,
h,
a,
b,
c, d,
e,
f, Add(
K(0x243185beul),
w10 =
Read8(
in, 40)));
148 Round(
f,
g,
h,
a,
b,
c, d,
e, Add(
K(0x550c7dc3ul),
w11 =
Read8(
in, 44)));
149 Round(
e,
f,
g,
h,
a,
b,
c, d, Add(
K(0x72be5d74ul),
w12 =
Read8(
in, 48)));
150 Round(d,
e,
f,
g,
h,
a,
b,
c, Add(
K(0x80deb1feul),
w13 =
Read8(
in, 52)));
151 Round(
c, d,
e,
f,
g,
h,
a,
b, Add(
K(0x9bdc06a7ul),
w14 =
Read8(
in, 56)));
152 Round(
b,
c, d,
e,
f,
g,
h,
a, Add(
K(0xc19bf174ul),
w15 =
Read8(
in, 60)));
250 a = Add(
a,
K(0x6a09e667ul));
251 b = Add(
b,
K(0xbb67ae85ul));
252 c = Add(
c,
K(0x3c6ef372ul));
253 d = Add(d,
K(0xa54ff53aul));
254 e = Add(
e,
K(0x510e527ful));
255 f = Add(
f,
K(0x9b05688cul));
256 g = Add(
g,
K(0x1f83d9abul));
257 h = Add(
h,
K(0x5be0cd19ul));
362 Round(
a,
b,
c, d,
e,
f,
g,
h, Add(
K(0xe49b69c1ul),
Inc(
w0,
sigma0(
w1))));
460 Write8(out, 0, Add(
a,
K(0x6a09e667ul)));
461 Write8(out, 4, Add(
b,
K(0xbb67ae85ul)));
462 Write8(out, 8, Add(
c,
K(0x3c6ef372ul)));
463 Write8(out, 12, Add(d,
K(0xa54ff53aul)));
464 Write8(out, 16, Add(
e,
K(0x510e527ful)));
465 Write8(out, 20, Add(
f,
K(0x9b05688cul)));
466 Write8(out, 24, Add(
g,
K(0x1f83d9abul)));
467 Write8(out, 28, Add(
h,
K(0x5be0cd19ul)));
static void WriteLE32(uint8_t *ptr, uint32_t x)
static uint32_t ReadLE32(const uint8_t *ptr)
#define Round(a, b, c, d, e, f, g, h, k, w)
void Transform_8way(uint8_t *out, const uint8_t *in)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...