def bits
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/limbs.bend as Limbsimport Base
219# all bits of a limb list, most significant first (16 per limb)
220def bits(xs: List<&2, Nat>) -> List<&2, Nat>:
221 match xs:
222 case Nil{}: Nil{}
223 case x <> t: List.append(&2, Nat, bits(t), bits_of(16n, x))
Uses (4)
Used by (21)
- bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/point:mul
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pmul:mul_r
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pmul:mul_v
- bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field:sqrt_bits
- bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field:inv_bits
- …