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)));
100 0x04050607UL, 0x00010203UL));
105 0x04050607UL, 0x00010203UL));
124 __m128i w0,
w1,
w2,
w3,
w4,
w5,
w6,
w7,
w8,
w9,
w10,
w11,
w12,
w13,
w14,
127 Round(
a,
b,
c, d,
e,
f,
g,
h, Add(
K(0x428a2f98ul),
w0 =
Read4(
in, 0)));
128 Round(
h,
a,
b,
c, d,
e,
f,
g, Add(
K(0x71374491ul),
w1 =
Read4(
in, 4)));
129 Round(
g,
h,
a,
b,
c, d,
e,
f, Add(
K(0xb5c0fbcful),
w2 =
Read4(
in, 8)));
130 Round(
f,
g,
h,
a,
b,
c, d,
e, Add(
K(0xe9b5dba5ul),
w3 =
Read4(
in, 12)));
131 Round(
e,
f,
g,
h,
a,
b,
c, d, Add(
K(0x3956c25bul),
w4 =
Read4(
in, 16)));
132 Round(d,
e,
f,
g,
h,
a,
b,
c, Add(
K(0x59f111f1ul),
w5 =
Read4(
in, 20)));
133 Round(
c, d,
e,
f,
g,
h,
a,
b, Add(
K(0x923f82a4ul),
w6 =
Read4(
in, 24)));
134 Round(
b,
c, d,
e,
f,
g,
h,
a, Add(
K(0xab1c5ed5ul),
w7 =
Read4(
in, 28)));
135 Round(
a,
b,
c, d,
e,
f,
g,
h, Add(
K(0xd807aa98ul),
w8 =
Read4(
in, 32)));
136 Round(
h,
a,
b,
c, d,
e,
f,
g, Add(
K(0x12835b01ul),
w9 =
Read4(
in, 36)));
137 Round(
g,
h,
a,
b,
c, d,
e,
f, Add(
K(0x243185beul),
w10 =
Read4(
in, 40)));
138 Round(
f,
g,
h,
a,
b,
c, d,
e, Add(
K(0x550c7dc3ul),
w11 =
Read4(
in, 44)));
139 Round(
e,
f,
g,
h,
a,
b,
c, d, Add(
K(0x72be5d74ul),
w12 =
Read4(
in, 48)));
140 Round(d,
e,
f,
g,
h,
a,
b,
c, Add(
K(0x80deb1feul),
w13 =
Read4(
in, 52)));
141 Round(
c, d,
e,
f,
g,
h,
a,
b, Add(
K(0x9bdc06a7ul),
w14 =
Read4(
in, 56)));
142 Round(
b,
c, d,
e,
f,
g,
h,
a, Add(
K(0xc19bf174ul),
w15 =
Read4(
in, 60)));
240 a = Add(
a,
K(0x6a09e667ul));
241 b = Add(
b,
K(0xbb67ae85ul));
242 c = Add(
c,
K(0x3c6ef372ul));
243 d = Add(d,
K(0xa54ff53aul));
244 e = Add(
e,
K(0x510e527ful));
245 f = Add(
f,
K(0x9b05688cul));
246 g = Add(
g,
K(0x1f83d9abul));
247 h = Add(
h,
K(0x5be0cd19ul));
352 Round(
a,
b,
c, d,
e,
f,
g,
h, Add(
K(0xe49b69c1ul),
Inc(
w0,
sigma0(
w1))));
450 Write4(out, 0, Add(
a,
K(0x6a09e667ul)));
451 Write4(out, 4, Add(
b,
K(0xbb67ae85ul)));
452 Write4(out, 8, Add(
c,
K(0x3c6ef372ul)));
453 Write4(out, 12, Add(d,
K(0xa54ff53aul)));
454 Write4(out, 16, Add(
e,
K(0x510e527ful)));
455 Write4(out, 20, Add(
f,
K(0x9b05688cul)));
456 Write4(out, 24, Add(
g,
K(0x1f83d9abul)));
457 Write4(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_4way(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...