def columns

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/blake/blake3.bend:95

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake3.bend as Blake3
import Base

95# A round mixes the columns, then the diagonals, of the 4x4 state.
96def columns(+v: List<&2,U32>, +m: List<&2,U32>) -> List<&2,U32>:
97  +v1 = g(v,0n,4n,8n,12n,at(m,0n),at(m,1n))
98  +v2 = g(v1,1n,5n,9n,13n,at(m,2n),at(m,3n))
99  +v3 = g(v2,2n,6n,10n,14n,at(m,4n),at(m,5n))
100  g(v3,3n,7n,11n,15n,at(m,6n),at(m,7n))

Uses (4)

Used by (1)