def even_b

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/secp256k1/schnorr.bend:46

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/schnorr.bend as Schnorr
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as FS

46# n - x when y is odd (the key or nonce whose point has even y)
47def even_b(+m: Nat, b: Nat, +x: Nat) -> Nat:
48  match b:
49    case 0n: x
50    case 1n+k: FS.mneg(m, x)

Uses (2)

Used by (3)