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:

About these ads

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

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

Follow

Get every new post delivered to your Inbox.

Join 133 other followers

%d bloggers like this: