def rounds

bend-collections@1.0.0.0 · src/crypto/aes/aes.bend:55

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

55# n full rounds, then the final round.
56def rounds(n: Nat, s: T.State, ks: List<&2, T.State>) -> T.State:
57  match n ks:
58    case 0n k <> rest:
59      last_round(s, k)
60    case 1n+p k <> rest:
61      rounds(p, round(s, k), rest)
62    case _ _:
63      s

Uses (5)

Used by (5)