def tf.svec
import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Twofishimport Base
268# S = (S_(k-1), .., S_0), the k words of the key-dependent S-boxes
269def tf.svec(n: Nat, +xs: List<&2, U32>, +i: Nat, acc: List<&2, U32>) -> List<&2, U32>:
270 match n:
271 case 0n:
272 acc
273 case 1n+p:
274 tf.svec(p, xs, Nat.add(i, 1n), Con{tf.s_word(xs, i), acc})