PROOF.sm4_step_unstep: 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 245-249 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=245&end_line=249 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/sm4.bend as S def sm4_step_unstep(+tab: L.LcTab, +rk: U32, s: M.CmBlock) -> {s == S.sm4.step(tab, rk, S.sm4.unstep(tab, rk, s)) : M.CmBlock}: match s: case M.CmBlock{+y0, +y1, +y2, y3}: %u32_xx(y3, S.sm4.t(tab, U32.xor(U32.xor(U32.xor(y0, y1), y2), rk))) : {M.CmBlock{y0, y1, y2, y3} == M.CmBlock{y0, y1, y2, _} : M.CmBlock} {==} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor 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=u32_xx https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend&name=LcTab https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=sm4.step https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=sm4.t https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=sm4.unstep