def np

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/consts.bend:219

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/consts.bend as Consts
import 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)