def tf.gmul.go

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

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

89def tf.gmul.go(n: Nat, +a: U32, +b: U32, +poly: U32, p: U32) -> U32:
90  match n:
91    case 0n:
92      p
93    case 1n+q:
94      tf.gmul.go(q, tf.xt(a, poly), U32.shr(b), poly, U32.xor(p, U32.and(a, U32.sub(0, U32.and(1, b)))))

Uses (7)

Used by (1)