def sub_word

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/aes/aes.bend:116

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/aes.bend as Aes
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/aes/types.bend as T

116# Section 5.1.1: SubBytes applies the S-box to every byte of the state.
117def sub_word(w: T.Quad) -> T.Quad:
118  match w:
119    case T.W{a, b, c, d}:
120      T.W{sbox(a), sbox(b), sbox(c), sbox(d)}

Uses (2)

Used by (5)