Sm4.sm4.t: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend as Sm4 Lines 48-51 of bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&start_line=48&end_line=51 import Base import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L # T = L(tau(x)), L(B) = B xor B<<<2 xor B<<<10 xor B<<<18 xor B<<<24 def sm4.t(+tab: L.LcTab, x: U32) -> U32: +b = sm4.tau(tab, x) U32.xor(U32.xor(U32.xor(b, L.lc.rotl(b, 2n)), U32.xor(L.lc.rotl(b, 10n), L.lc.rotl(b, 18n))), L.lc.rotl(b, 24n)) Uses (5): 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-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/legacy_ciphers.bend&name=lc.rotl https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend&name=sm4.tau