def aria.xor

bend-osdev-legacy-ciphers@0.1.0.0 · aria.bend:4441

import bend-osdev-legacy-ciphers@0.1.0.0/aria.bend as Aria
import Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M

4441# The state XORed with a round key, kept as a block (a word at a time: Bend's
4442# C backend takes at most 247 live one-word values, and a state is 128 bits)
4443def aria.xor(s: LcAriaSt, k: M.CmBlock) -> LcAriaSt:
4444  match s k:
4445    case LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} M.CmBlock{w0, w1, w2, w3}:
4446      aria.of_quads(aria.xq(x0, x1, x2, x3, w0), aria.xq(x4, x5, x6, x7, w1), aria.xq(x8, x9, x10, x11, w2), aria.xq(x12, x13, x14, x15, w3))

Uses (4)

Used by (3)