def ad.aes.x2

bend-osdev-aead@0.1.0.0 · aesround.bend:152

import bend-osdev-aead@0.1.0.0/aesround.bend as Aesround
import Base

152# x times 2 in GF(2^8) (xtime, FIPS 197 4.2.1)
153def ad.aes.x2(+a: U32) -> U32:
154  U32.xor(U32.and(255, U32.shl(a)), U32.mul(27, U32.shrn(a, 7n)))

Uses (6)

Used by (1)