def cam.white

bend-osdev-legacy-ciphers@0.1.0.0 · camellia.bend:116

import bend-osdev-legacy-ciphers@0.1.0.0/camellia.bend as Camellia
import Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L

116# D1 ^= a, D2 ^= b
117def cam.white(a: L.LcBlock64, b: L.LcBlock64, s: M.CmBlock) -> M.CmBlock:
118  match a b:
119    case L.LcBlock64{a0, a1} L.LcBlock64{b0, b1}:
120      M.CmBlock.xor(s, M.CmBlock{a0, a1, b0, b1})

Uses (3)

Used by (3)