law aes_key_length

bend-osdev-crypto@0.1.0.0 · LAWS.bend:1149

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
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_aes.bend as A

1149# AES-128 and AES-256 (cipher-modes): a key of 24 bytes is refused
1150law aes_key_length:
1151  {Result.map(&2, &2, Cr.CrError, X.CmAesKey, Unit, k => Unit{}, A.CrAes.key(B.Octets.zeros(24n))) == Fail{Cr.CrBadKeyLength{24n}} : Result<&2, &2, Cr.CrError, Unit>}

Uses (7)

Used by (0)

No other definition uses this definition.