def mul

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/aes/aes.bend:25

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

25# Section 4.2: the product of two bytes is their polynomial product modulo m(x).
26def mul(+a: U32, +b: U32) -> U32:
27  byte(P.reduce(8n, low(), P.mul(bits(a), bits(b))))

Uses (6)

Used by (12)