def times_x
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as Polyimport Base
59# Multiplication by x modulo m(x) = x^n + low(x) (deg low < n): shift every
60# coefficient up one degree; the coefficient that reaches x^n is replaced by
61# low(x), since x^n = low(x) modulo m(x).
62def times_x(+n: Nat, +low: Word(n), +r: Word(n)) -> Word(n):
63 Word.xor(n, wscale(n, top(n, r), low), Word.shl(n, r))
Uses (6)
Used by (16)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly:reduce
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:sa
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:sm
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:tx_zero
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:tx_xor
- …