def big0
bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha512/core.bend:26
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
26
27def big0(x: T.Lane) -> T.Lane:
28 match x:
29 case T.W{+hi, +lo}:
30 T.W{U32.xor(U32.xor(U32.or(U32.shrn(hi, 28n), U32.shln(lo, 4n)), U32.or(U32.shrn(lo, 2n), U32.shln(hi, 30n))), U32.or(U32.shrn(lo, 7n), U32.shln(hi, 25n))),
31 U32.xor(U32.xor(U32.or(U32.shrn(lo, 28n), U32.shln(hi, 4n)), U32.or(U32.shrn(hi, 2n), U32.shln(lo, 30n))), U32.or(U32.shrn(hi, 7n), U32.shln(lo, 25n)))}