def xor_lanes

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/sha3.bend:76

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/sha3.bend as Sha3
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/keccak/types.bend as T
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/keccak/permutation.bend as K

76# Lane-wise XOR of a block into the leading lanes of the state.
77def xor_lanes(xs: List<&2, T.Lane>, ys: List<&2, T.Lane>) -> List<&2, T.Lane>:
78  match xs ys:
79    case x <> xt y <> yt:
80      K.xor(x, y) <> xor_lanes(xt, yt)
81    case xs _:
82      xs

Uses (3)

Used by (3)