def tf.s_word

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

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

263# S_i: RS times key bytes 8i .. 8i + 7
264def tf.s_word(+xs: List<&2, U32>, +i: Nat) -> U32:
265  +j = Nat.mul(8n, i)
266  L.lc.le(tf.rs.row(8n, xs, 0n, j, 0n, 0), tf.rs.row(8n, xs, 1n, j, 0n, 0), tf.rs.row(8n, xs, 2n, j, 0n, 0), tf.rs.row(8n, xs, 3n, j, 0n, 0))

Uses (6)

Used by (1)