LAWS.sm4_pcbc_round_trip: law of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS Lines 734-739 of bend-osdev-crypto@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/LAWS.bend&start_line=734&end_line=739 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/sm4.bend as S import bend-osdev-crypto@0.1.0.0/pcbc.bend as Pc import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM # SM4 (legacy-ciphers) in PCBC (pcbc.bend): decryption undoes encryption, for every key, IV and list of blocks law sm4_pcbc_round_trip: for +k: S.LcSm4Key for +iv: M.CmBlock for +bs: List<&2, M.CmBlock> {Pc.CrPcbc.decrypt_blocks(~S.LcSm4Key, ~M.CmBlock, ~S.LcSm4.decrypt, ~CM.CrBlk128.xor, k, iv, Pc.CrPcbc.encrypt_blocks(~S.LcSm4Key, ~M.CmBlock, ~S.LcSm4.encrypt, ~CM.CrBlk128.xor, k, iv, bs)) == bs : List<&2, M.CmBlock>} Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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/cipher_modes.bend&name=CmBlock https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/PROOF.bend&name=pcbc_dec_pub https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/PROOF.bend&name=pcbc_enc_pub https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/PROOF.bend&name=pcbc_rt.sm4 https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.xor https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pcbc.bend&name=CrPcbc.decrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pcbc.bend&name=CrPcbc.encrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pcbc.bend&name=cr.pcbc.dec https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pcbc.bend&name=cr.pcbc.dec.go https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pcbc.bend&name=cr.pcbc.enc https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pcbc.bend&name=cr.pcbc.enc.go https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4.decrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=LcSm4Key