def aes.isbox

bend-osdev-cipher-modes@0.1.0.0 · aes.bend:53

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

53# the inverse S-box: the inverse affine map, then the inverse
54def aes.isbox(x: U32) -> U32:
55  +b = U32.and(255, x)
56  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 (1)