Skip to content

Instantly share code, notes, and snippets.

@davidp94
Created March 20, 2018 11:50
Show Gist options
  • Save davidp94/0f61b7afb5e9a00376ba8083069d0f05 to your computer and use it in GitHub Desktop.
Save davidp94/0f61b7afb5e9a00376ba8083069d0f05 to your computer and use it in GitHub Desktop.
generate secp256k1 and print in hex string
# might require pip install ecdsa
from ecdsa import SigningKey, SECP256k1
sk = SigningKey.generate(curve=SECP256k1) # uses SECP256k1
vk = sk.get_verifying_key()
print('This is the secret key {} \nThis is the public key {}'.format(sk.to_string().hex(), vk.to_string().hex()))
@davidp94
Copy link
Author

bash script to generate multiple:

for n in {1..15}; do python3 generate_secp256k1.py ; done; exit 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment