def g

bend-collections-laws-crypto@1.0.0.0 · src/crypto/blake/blake2b/compress.bend:6

import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/compress.bend as Compress
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/src/crypto/blake/blake2b/lane.bend as L

6# G (RFC 7693 section 3.1) on four words and two message words.
7def g(a: T.Lane, +b: T.Lane, c: T.Lane, d: T.Lane, x: T.Lane, y: T.Lane) -> T.Quad:
8  +a1 = L.add(L.add(a,b),x)
9  +d1 = L.rot32(L.xor(d,a1))
10  +c1 = L.add(c,d1)
11  +b1 = L.rot24(L.xor(b,c1))
12  +a2 = L.add(L.add(a1,b1),y)
13  +d2 = L.rot16(L.xor(d1,a2))
14  +c2 = L.add(c1,d2)
15  +b2 = L.rot63(L.xor(b1,c2))
16  T.Q{a2,b2,c2,d2}

Uses (8)

Used by (96)