Aes.aes.sbox: def of bend-osdev-cipher-modes@0.1.0.0 Import: import bend-osdev-cipher-modes@0.1.0.0/aes.bend as Aes Lines 48-51 of bend-osdev-cipher-modes@0.1.0.0/aes.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&start_line=48&end_line=51 import Base # the S-box: the inverse, then the affine map def aes.sbox(+x: U32) -> U32: +b = aes.inv(U32.and(255, x)) U32.xor(U32.xor(U32.xor(U32.xor(U32.xor(b, aes.rotl(b, 1n)), aes.rotl(b, 2n)), aes.rotl(b, 3n)), aes.rotl(b, 4n)), 99) Uses (5): 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.xor https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&name=aes.inv https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&name=aes.rotl