def GB

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/argon2/blamka.bend:29

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/blamka.bend as Blamka
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/types.bend as T
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend as B

29# GB(a, b, c, d) (RFC 9106 section 3.6).
30def GB(+a: T.Lane, +b: T.Lane, +c: T.Lane, +d: T.Lane) -> T.Quad:
31  +a1 = fBlaMka(a, b)
32  +d1 = B.rotr(B.xor(d, a1), 32n)
33  +c1 = fBlaMka(c, d1)
34  +b1 = B.rotr(B.xor(b, c1), 24n)
35  +a2 = fBlaMka(a1, b1)
36  +d2 = B.rotr(B.xor(d1, a2), 16n)
37  +c2 = fBlaMka(c1, d2)
38  +b2 = B.rotr(B.xor(b1, c2), 63n)
39  T.Q{a2, b2, c2, d2}

Uses (5)

Used by (11)