def big1

bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha512/core.bend:33

import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/core.bend as Core
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/types.bend as T

33# FIPS 180-4 (4.11): ROTR14 ^ ROTR18 ^ ROTR41
34def big1(x: T.Lane) -> T.Lane:
35  match x:
36    case T.W{+hi, +lo}:
37      T.W{U32.xor(U32.xor(U32.or(U32.shrn(hi, 14n), U32.shln(lo, 18n)), U32.or(U32.shrn(hi, 18n), U32.shln(lo, 14n))), U32.or(U32.shrn(lo, 9n), U32.shln(hi, 23n))),
38        U32.xor(U32.xor(U32.or(U32.shrn(lo, 14n), U32.shln(hi, 18n)), U32.or(U32.shrn(lo, 18n), U32.shln(hi, 14n))), U32.or(U32.shrn(hi, 9n), U32.shln(lo, 23n)))}

Uses (5)

Used by (1)