Sbox.xtime_word: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/aes/sbox.bend as Sbox Lines 146-149 of bend-collections@1.0.0.0/src/crypto/aes/sbox.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/aes/sbox.bend&start_line=146&end_line=149 import Base # {02} * x in GF(2^8) (FIPS 197 section 4.2.1, xtime): shift left and, when # bit 7 was set, add x^8 = {1b}; the reduction mask is 0 - bit7, not a branch. def xtime_word(+x: U32) -> U32: U32.xor(U32.and(254, U32.shln(x, 1n)), U32.and(27, U32.sub(0, U32.and(1, U32.shrn(x, 7n))))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shln https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor