law cast5_key_length

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

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-legacy-ciphers@0.1.0.0/cast5.bend as C5
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/inst_lc.bend as LC

1017# CAST-128 (legacy-ciphers): a key of 4 bytes is refused
1018law cast5_key_length:
1019  {Result.map(&2, &2, Cr.CrError, C5.LcCast5Key, Unit, k => Unit{}, LC.CrLc.key(~C5.LcCast5Key, ~C5.LcCast5.key, B.Octets.zeros(4n))) == Fail{Cr.CrBadKeyLength{4n}} : Result<&2, &2, Cr.CrError, Unit>}

Uses (8)

Used by (0)

No other definition uses this definition.