law cast5_rfc2144

bend-osdev-legacy-ciphers@0.1.0.0 · LAWS.bend:316

import bend-osdev-legacy-ciphers@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/legacy_ciphers.bend as L
import bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend as C5

316# RFC 2144, Appendix B.1: CAST-128 with the 128-bit key
317# 0123456712345678234567893456789A, plaintext 0123456789ABCDEF, ciphertext
318# 238B4FE5847E44B2
319law cast5_rfc2144:
320  {Result.map(&2, &2, L.LcError, C5.LcCast5Key, L.LcBlock64, k => C5.LcCast5.encrypt(k, L.LcBlock64{19088743, 2309737967}), C5.LcCast5.key(B.Octets.of_list([1, 35, 69, 103, 18, 52, 86, 120, 35, 69, 103, 137, 52, 86, 120, 154]))) == Done{L.LcBlock64{596332517, 2222867634}} : Result<&2, &2, L.LcError, L.LcBlock64>}

Uses (9)

Used by (0)

No other definition uses this definition.