PROOF.tf_bswap: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/PROOF.bend as PROOF Lines 407-414 of bend-osdev-legacy-ciphers@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/PROOF.bend&start_line=407&end_line=414 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/legacy_ciphers.bend as L import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as F def tf_bswap(s: M.CmBlock) -> {s == F.tf.unop(F.LcTfBswap{}, F.tf.op(F.LcTfBswap{}, s)) : M.CmBlock}: match s: case M.CmBlock{+a, +b, +c, +d}: %bswap2(a) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, L.lc.bswap.bits(L.lc.bswap.bits(b)), L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(b) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(c) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, _, L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(d) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, c, _} : M.CmBlock} {==} Uses (6): 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-legacy-ciphers@0.1.0.0/PROOF.bend&name=bswap2 https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend&name=lc.bswap.bits https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend&name=LcTfOp https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend&name=tf.op https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend&name=tf.unop