def Cmac.dbl

bend-osdev-cipher-modes@0.1.0.0 · cmac.bend:17

import bend-osdev-cipher-modes@0.1.0.0/cmac.bend as Cmac
import Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M

17def Cmac.dbl(b: M.CmBlock) -> M.CmBlock:
18  match b:
19    case M.CmBlock{+w0, +w1, +w2, +w3}:
20      M.CmBlock{U32.or(U32.shl(w0), U32.shrn(w1, 31n)), U32.or(U32.shl(w1), U32.shrn(w2, 31n)), U32.or(U32.shl(w2), U32.shrn(w3, 31n)), U32.xor(U32.shl(w3), U32.and(135, M.cm.mask(U32.shrn(w0, 31n))))}

Uses (7)

Used by (2)