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

Function Maj

src/crypto/sha256_sse41.cpp:32–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31__m128i inline Ch(__m128i x, __m128i y, __m128i z) { return Xor(z, And(x, Xor(y, z))); }
32__m128i inline Maj(__m128i x, __m128i y, __m128i z) { return Or(And(x, y), And(z, Or(x, y))); }
33__m128i inline Sigma0(__m128i 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__m128i inline Sigma1(__m128i x) { return Xor(Or(ShR(x, 6), ShL(x, 26)), Or(ShR(x, 11), ShL(x, 21)), Or(ShR(x, 25), ShL(x, 7))); }
35__m128i inline sigma0(__m128i x) { return Xor(Or(ShR(x, 7), ShL(x, 25)), Or(ShR(x, 18), ShL(x, 14)), ShR(x, 3)); }

Callers 1

RoundFunction · 0.70

Calls 2

OrFunction · 0.70
AndFunction · 0.70

Tested by

no test coverage detected