def tf.kpair

bend-osdev-legacy-ciphers@0.1.0.0 · twofish.bend:276

import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Twofish
import Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L

276# K_(2i) and K_(2i+1) as an LcBlock64
277def tf.kpair(+t: LcTfTabs, +me: List<&2, U32>, +mo: List<&2, U32>, +i: U32) -> L.LcBlock64:
278  +a = tf.h(t, U32.mul(U32.mul(2, i), 16843009), me)
279  +b = L.lc.rotl(tf.h(t, U32.mul(U32.add(U32.mul(2, i), 1), 16843009), mo), 8n)
280  L.LcBlock64{U32.add(a, b), L.lc.rotl(U32.add(a, U32.add(b, b)), 9n)}

Uses (8)

Used by (1)