def hash_scalar
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as Ecdsaimport 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)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa:sign_d
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pscal:hash_v
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa:recover_len
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa:verify_q
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/prec:rsig
- …