def hash_scalar

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/secp256k1/ecdsa.bend:38

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as Ecdsa
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/curve.bend as CV

38# e = bits2int(H) mod n (SEC 1 4.1.3 step 5; RFC 6979 2.3.2)
39def hash_scalar(+one: Nat, +h: List<&2, U32>) -> Nat:
40  Nat.mod(CV.os2ip(h), n(one))

Uses (6)

Used by (7)