law twofish_cbc_round_trip

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

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
import Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M
import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Tf
import bend-osdev-crypto@0.1.0.0/modes.bend as Md
import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM

859# Twofish (legacy-ciphers) in CBC (modes.bend): decryption undoes encryption, for every key, IV and list of blocks
860law twofish_cbc_round_trip:
861  for +k: Tf.LcTwofishKey
862  for +iv: M.CmBlock
863  for +bs: List<&2, M.CmBlock>
864  {Md.CrCbc.decrypt_blocks(~Tf.LcTwofishKey, ~M.CmBlock, ~Tf.LcTwofish.decrypt, ~CM.CrBlk128.xor, k, iv, Md.CrCbc.encrypt_blocks(~Tf.LcTwofishKey, ~M.CmBlock, ~Tf.LcTwofish.encrypt, ~CM.CrBlk128.xor, k, iv, bs)) == bs : List<&2, M.CmBlock>}

Uses (16)

Used by (0)

No other definition uses this definition.