def hash_scalar

bend-collections-laws-crypto@1.0.0.0 · src/crypto/secp256k1/ecdsa.bend:28

import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/ecdsa.bend as Ecdsa
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/scalar.bend as S
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/bytes.bend as B

28# a 32-byte string as a scalar mod n (bits2int with qlen = hlen = 256,
29# reduced: SEC 1 section 4.1.3 step 5, RFC 6979 section 2.3.2)
30def hash_scalar(+h: List<&2, U32>) -> List<&2, Nat>:
31  S.reduce(B.of_be(h))

Uses (5)

Used by (8)