def sp.lt4

bend-osdev-legacy-ciphers@0.1.0.0 · serpent.bend:183

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

183# X3 = X3 xor X2 xor (X0 << 3) (its own inverse)
184def sp.lt4(s: M.CmBlock) -> M.CmBlock:
185  match s:
186    case M.CmBlock{+x0, x1, +x2, x3}:
187      M.CmBlock{x0, x1, x2, U32.xor(x3, U32.xor(x2, U32.shln(x0, 3n)))}

Uses (3)

Used by (5)