LAWS.cbc_blocks_round_trip: law of bend-osdev-cipher-modes@0.1.0.0 Import: import bend-osdev-cipher-modes@0.1.0.0/LAWS.bend as LAWS Lines 19-28 of bend-osdev-cipher-modes@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cipher-modes@0.1.0.0/LAWS.bend&start_line=19&end_line=28 import Base import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M import bend-osdev-cipher-modes@0.1.0.0/cbc.bend as C # CBC on blocks: decryption undoes encryption, for every key, IV and message law cbc_blocks_round_trip: for ~K: Data for ~enc: K -> M.CmBlock -> M.CmBlock for ~dec: K -> M.CmBlock -> M.CmBlock for ~inv: @k: K -> @b: M.CmBlock -> {dec(k, enc(k, b)) == b : M.CmBlock} for +k: K for iv: M.CmBlock for bs: List<&2, M.CmBlock> {C.Cbc.decrypt_blocks(~K, ~dec, k, iv, C.Cbc.encrypt_blocks(~K, ~enc, k, iv, bs)) == bs : List<&2, M.CmBlock>} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/PROOF.bend&name=cbcp.go https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/PROOF.bend&name=tr.cbc_dec_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/PROOF.bend&name=tr.cbc_enc_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cbc.bend&name=Cbc.decrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cbc.bend&name=Cbc.encrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cbc.bend&name=cbc.dec.fast https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cbc.bend&name=cbc.enc https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmBlock