def nk

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

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

253# Figure 4: Nk is the key length in 32-bit words and Nr = Nk + 6
254# (AES-128: 4, 10; AES-192: 6, 12; AES-256: 8, 14).
255def nk(+key: List<&2, U32>) -> Nat:
256  Nat.div(List.length(&2, U32, key), 4n)

Uses (5)

Used by (19)