Show me the code! – By Davanum Srinivas

March 17, 2014

Generating a Bitcoin Private Key and Address

Filed under: bitcoin — Davanum Srinivas @ 11:30 am

Ken Shirriff’s blog post here has an excellent introduction to Bitcoin. One of his code snippets shows a sample python code to generate a private key in WIF format and an address. I tweaked it just a bit to replace usage of python’s random module with os.urandom and stripped it down to just what’s needed to show the exponent, private key and address. Here’s the effort in a gist:

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 130 other followers