def tf.mds
import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Twofishimport Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
128def tf.mds(t: LcTfTabs, +y: U32) -> U32:
129 match t:
130 case LcTfTabs{q0, q1, m0, m1, m2, m3}:
131 U32.xor(U32.xor(L.lc.tab.get(8n, m0, L.lc.byte(y, 0n)), L.lc.tab.get(8n, m1, L.lc.byte(y, 1n))), U32.xor(L.lc.tab.get(8n, m2, L.lc.byte(y, 2n)), L.lc.tab.get(8n, m3, L.lc.byte(y, 3n))))