def minv
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as Fieldimport Base
62# a^(m - 2): for a prime m the inverse of a nonzero a (Fermat); 0 for 0
63def minv(+m: Nat, a: Nat) -> Nat:
64 mpow(m, a, Nat.sub(m, 2n))
Uses (3)
Used by (11)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/curve:to_affine
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/paff:aff_v
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa:finish
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/scalarpow:inv_v
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa:recover_r
- …