def aes.dkeys

bend-osdev-cipher-modes@0.1.0.0 · aes.bend:246

import bend-osdev-cipher-modes@0.1.0.0/aes.bend as Aes
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B

246# the decryption round keys: the ones computed already, or from the key bytes
247def aes.dkeys(dk: List<&2, CmAesState>, +raw: List<&2, U32>) -> List<&2, CmAesState>:
248  match dk:
249    case Nil{}:
250      List.reverse(&2, CmAesState, aes.round_keys(aes.expand(Nat.div(B.len(raw), 4n), raw)))
251    case Con{h, t}:
252      Con{h, t}

Uses (8)

Used by (2)