def aes_subword

qasim-bend-kit@0.1.0.2 · libs/AES256GCMCore.bend:49

import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as AES256GCMCore
import 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))

Uses (6)

Used by (2)