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

Function QuadRound

src/crypto/sha256_x86_shani.cpp:20–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18alignas(__m128i) const uint8_t INIT1[16] = {0x19, 0xcd, 0xe0, 0x5b, 0xab, 0xd9, 0x83, 0x1f, 0x3a, 0xf5, 0x4f, 0xa5, 0x72, 0xf3, 0x6e, 0x3c};
19
20void inline __attribute__((always_inline)) QuadRound(__m128i& state0, __m128i& state1, uint64_t k1, uint64_t k0)
21{
22 const __m128i msg = _mm_set_epi64x(k1, k0);
23 state1 = _mm_sha256rnds2_epu32(state1, state0, msg);
24 state0 = _mm_sha256rnds2_epu32(state0, state1, _mm_shuffle_epi32(msg, 0x0e));
25}
26
27void inline __attribute__((always_inline)) QuadRound(__m128i& state0, __m128i& state1, __m128i m, uint64_t k1, uint64_t k0)
28{

Callers 2

TransformFunction · 0.85
Transform_2wayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected