MCPcopy Create free account
hub / github.com/ElementsProject/elements / Ch

Function Ch

src/crypto/sha256_avx2.cpp:31–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29__m256i inline ShL(__m256i x, int n) { return _mm256_slli_epi32(x, n); }
30
31__m256i inline Ch(__m256i x, __m256i y, __m256i z) { return Xor(z, And(x, Xor(y, z))); }
32__m256i inline Maj(__m256i x, __m256i y, __m256i z) { return Or(And(x, y), And(z, Or(x, y))); }
33__m256i inline Sigma0(__m256i x) { return Xor(Or(ShR(x, 2), ShL(x, 30)), Or(ShR(x, 13), ShL(x, 19)), Or(ShR(x, 22), ShL(x, 10))); }
34__m256i inline Sigma1(__m256i x) { return Xor(Or(ShR(x, 6), ShL(x, 26)), Or(ShR(x, 11), ShL(x, 21)), Or(ShR(x, 25), ShL(x, 7))); }

Callers 1

RoundFunction · 0.70

Calls 2

XorFunction · 0.70
AndFunction · 0.70

Tested by

no test coverage detected