def Xts.mul_alpha
import bend-osdev-cipher-modes@0.1.0.0/xts.bend as Xtsimport 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))}