def aria.rotb
bend-osdev-legacy-ciphers@0.1.0.0 · aria.bend:4532
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
4532def aria.rotb(+r: Nat, b: M.CmBlock) -> M.CmBlock:
4533 match b:
4534 case M.CmBlock{+a, +c, +d, +e}:
4535 +l = Nat.sub(32n, r)
4536 M.CmBlock{U32.or(U32.shrn(a, r), U32.shln(e, l)), U32.or(U32.shrn(c, r), U32.shln(a, l)), U32.or(U32.shrn(d, r), U32.shln(c, l)), U32.or(U32.shrn(e, r), U32.shln(d, l))}