def aes.expand
import bend-osdev-cipher-modes@0.1.0.0/aes.bend as Aesimport Base
218# the 4 (Nr + 1) words of the schedule, Nr = Nk + 6
219def aes.expand(+nk: Nat, xs: List<&2, U32>) -> List<&2, U32>:
220 +ws = aes.words(xs)
221 aes.expand.go(Nat.sub(Nat.mul(4n, Nat.add(nk, 7n)), nk), nk, nk, ws, List.reverse(&2, U32, ws))