def Xts.mul_alpha

bend-osdev-cipher-modes@0.1.0.0 · xts.bend:29

import bend-osdev-cipher-modes@0.1.0.0/xts.bend as Xts
import Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M

29def Xts.mul_alpha(t: M.CmBlock) -> M.CmBlock:
30  match t:
31    case M.CmBlock{+w0, +w1, +w2, +w3}:
32      M.CmBlock{U32.xor(xts.shift(w0), U32.and(2264924160, M.cm.mask(U32.shrn(w3, 7n)))), U32.or(xts.shift(w1), xts.carry(w0)), U32.or(xts.shift(w2), xts.carry(w1)), U32.or(xts.shift(w3), xts.carry(w2))}

Uses (8)

Used by (12)