def aes_subword
import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as AES256GCMCoreimport Base
49def aes_subword(+w: U32) -> U32:
50 a b c d = aes_sbox(U32.shrn(w, 24n)) aes_sbox(U32.and(255, U32.shrn(w, 16n)))
51 aes_sbox(U32.and(255, U32.shrn(w, 8n))) aes_sbox(U32.and(255, w))
52 U32.or(U32.or(U32.shln(a, 24n), U32.shln(b, 16n)),
53 U32.or(U32.shln(c, 8n), d))