def CrAes.key_enc

bend-osdev-crypto@0.1.0.0 · inst_aes.bend:24

import bend-osdev-crypto@0.1.0.0/inst_aes.bend as InstAes
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-cipher-modes@0.1.0.0/aes.bend as X
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM

24# the same without the decryption round keys, for uses that only encrypt
25# (CTR, CMAC, CCM): a key made this way still decrypts, deriving those round
26# keys again for every block
27def CrAes.key_enc(o: B.Octets) -> Result<&2, &2, Cr.CrError, X.CmAesKey>:
28  CM.CrCm.lift(~X.CmAesKey, X.CmAes.key(o))

Uses (6)

Used by (5)