def np
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/consts.bend as Constsimport Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as FS
219# n = 1 + np, n + c = 2^256
220def np(+one: Nat) -> Nat:
221 Nat.sub(C.shift(256n, one), Nat.add(FS.cn(one), 1n))
Uses (5)
Used by (32)
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/consts:order_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/consts:hm_n
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap:lt_n_s
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/scalarops:neg_v
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/scalarops:red_r
- …