def tf.q.raw

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

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

52# q(x) from its tables
53def tf.q.raw(+ts: List<&2, U32>, +x: U32) -> U32:
54  +a0 = U32.shrn(x, 4n)
55  +b0 = U32.and(15, x)
56  tf.q.go(ts, tf.t(ts, 0n, U32.xor(a0, b0)), tf.t(ts, 1n, tf.q.half(a0, b0)))

Uses (8)

Used by (2)