def ad.aes.x2
import bend-osdev-aead@0.1.0.0/aesround.bend as Aesroundimport 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)))
import bend-osdev-aead@0.1.0.0/aesround.bend as Aesroundimport 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)))