Skip to content

Instantly share code, notes, and snippets.

@BlackVoid
Last active August 29, 2015 13:57
Show Gist options
  • Save BlackVoid/9746964 to your computer and use it in GitHub Desktop.
Save BlackVoid/9746964 to your computer and use it in GitHub Desktop.
"""
Requires ecdsa
pip install ecdsa
"""
from binascii import unhexlify
from hashlib import sha256
from ecdsa.keys import SigningKey
from ecdsa.curves import NIST256p
private = SigningKey.generate(NIST256p, hashfunc=sha256)
print("Private key: %s" % private.to_string().encode('hex'))
print("Public key: %s" % private.get_verifying_key().to_string().encode('hex'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment