law des_cbc_octets_round_trip

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

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/des.bend as D
import bend-osdev-legacy-ciphers@0.1.0.0/modes64.bend as X

250law des_cbc_octets_round_trip:
251  for +k: D.LcDesKey
252  for +iv: L.LcBlock64
253  for +bs: List<&2, L.LcBlock64>
254  {Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, X.Lc64.cbc_encrypt(~D.LcDesKey, ~D.LcDes.encrypt, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(bs)), c => X.Lc64.cbc_decrypt(~D.LcDesKey, ~D.LcDes.decrypt, k, L.LcBlock64.to_octets(iv), c)) == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>}

Uses (19)

Used by (0)

No other definition uses this definition.