def sm4.t2
import bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend as Sm4import Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
53# T' of the key schedule: L'(B) = B xor B<<<13 xor B<<<23
54def sm4.t2(+tab: L.LcTab, x: U32) -> U32:
55 +b = sm4.tau(tab, x)
56 U32.xor(U32.xor(b, L.lc.rotl(b, 13n)), L.lc.rotl(b, 23n))