LAWS.xts_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 44-54 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=44&end_line=54 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/xts.bend as T # XTS on blocks: decryption undoes encryption, for every data key and every # starting tweak (T_0 = Xts.tweak(k2, i), so every k2 and i are covered) law xts_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 +k1: K for t: M.CmBlock for bs: List<&2, M.CmBlock> {T.Xts.decrypt_blocks(~K, ~dec, k1, t, T.Xts.encrypt_blocks(~K, ~enc, k1, t, 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=tr.xts_dec_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/PROOF.bend&name=tr.xts_enc_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/PROOF.bend&name=xtsp.go https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmBlock https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/xts.bend&name=Xts.decrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/xts.bend&name=Xts.encrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/xts.bend&name=xts.dec.fast https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/xts.bend&name=xts.enc