Poly.times_x: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as Poly Lines 59-63 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend&start_line=59&end_line=63 import Base # Multiplication by x modulo m(x) = x^n + low(x) (deg low < n): shift every # coefficient up one degree; the coefficient that reaches x^n is replaced by # low(x), since x^n = low(x) modulo m(x). def times_x(+n: Nat, +low: Word(n), +r: Word(n)) -> Word(n): Word.xor(n, wscale(n, top(n, r), low), Word.shl(n, r)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.shl https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.xor https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend&name=top https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend&name=wscale