def sm

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/aes/gf.bend:288

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf.bend as Gf
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as P

288# sum over the set coefficients a_i of v * x^i (mod m)
289def sm(+n: Nat, +low: Word(n), a: List<&2, Bool>, +v: Word(n)) -> Word(n):
290  match a:
291    case Nil{}:
292      Word.zero(n)
293    case c <> r:
294      Word.xor(n, P.wscale(n, c, v), sm(n, low, r, P.times_x(n, low, v)))

Uses (8)

Used by (4)