ecdsa.rfc6979 module
- RFC 6979:
Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)
- Many thanks to Coda Hale for his implementation in Go language:
- ecdsa.rfc6979.generate_k(order, secexp, hash_func, data, retry_gen=0, extra_entropy=b'')[source]
Generate the
k
value - the nonce for DSA.- Parameters:
order (int) – order of the DSA generator used in the signature
secexp (int) – secure exponent (private key) in numeric form
hash_func – reference to the same hash function used for generating hash, like
hashlib.sha1
data (bytes) – hash in binary form of the signing data
retry_gen (int) – how many good ‘k’ values to skip before returning
extra_entropy (bytes) – additional added data in binary form as per section-3.6 of rfc6979
- Return type: