def msub

bend-collections@1.0.0.0 · spec/crypto/secp256k1/field.bend:49

import bend-collections@1.0.0.0/spec/crypto/secp256k1/field.bend as Field
import Base

49# a - b mod m
50def msub(+m: Nat, a: Nat, b: Nat) -> Nat:
51  Nat.mod(Nat.sub(Nat.add(a, m), Nat.mod(b, m)), m)

Uses (4)

Used by (2)