def scale
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as Polyimport Base
18# c * a for a constant c in GF(2).
19def scale(+c: Bool, a: List<&2, Bool>) -> List<&2, Bool>:
20 match a:
21 case Nil{}:
22 Nil{}
23 case x <> xs:
24 Bool.and(c, x) <> scale(c, xs)
Uses (3)
Used by (5)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly:mul
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:red_mul
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:red_scale
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:red_scale_false
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf:scale_true