def aes.isbox

bend-osdev-aes@0.1.0.0 · aes.bend:56

import bend-osdev-aes@0.1.0.0/aes.bend as Aes
import Base

56# the inverse S-box: the inverse affine map, then the inverse
57def aes.isbox(x: U32) -> U32:
58  +b = U32.and(255, x)
59  aes.inv(U32.xor(U32.xor(U32.xor(aes.rotl(b, 1n), aes.rotl(b, 3n)), aes.rotl(b, 6n)), 5))

Uses (5)

Used by (4)