Public Key and Bitcoin Address are the most confused terms among the Bitcoin community. Today, I clarify the difference between these two once for all.

First off, let’s go through a quick introduction to Private and Public keys.

Bitcoin is a digital cash, a way of buying and selling things over the Internet. The first step is establishing a digital wallet, either via a browser-based web wallet or by downloading a desktop or smartphone wallet. Your Bitcoin Address as well as your Public and Private keys are generated automatically when you set up your wallet.

Private Key

A Private Key allows you to spend your bitcoins. It’s important that it’s kept secure and private, since it’s the only proof of ownership of your bitcoins. Anyone with an access to your private key, has access to controlling, spending or transferring your bitcoins.

Technically, Private Key is a 256-bit number (usually represented in a hexadecimal format). Since hexadecimal numbers take up 4 bits in storage each, the total length of a private key is 64 (256 / 4) Here’s a sample private key:
e9873d79c6d87dc0fb6a5778633389f4453213303da61f20bd67fc233aa33262

Analogy: Think of a private key as a password to your bank account. You should protect it from others, so noone else can spend your own money.

Public Key

A Public Key lets others send you bitcoins. It should be publicly available at any time. Public key is generated from private key through an Elliptic Function (Elliptic Curve Digital Signature Algorithm).

Generate Public Key

Technically, Public Key is a 520-bit number (usually represented in a hexadecimal format). It is 130 (520 / 4) hexadecimal numbers long. Here’s how a sample public key looks like:
4c069b061b4cd63d6c8af8e4cf2c7eb63f8accf33a1bd72bbc71d10dd1954c4b8a864ca7cf07de3df24ada0ad8a79cac82640fde8a037e641c06b8c1255ebb69a4

Analogy: Think of a public key as a number of your bank account. It is publicly available, so that other people can send money directly to your bank account.

Private vs Public Key

What is Bitcoin Address?

Although reversing Public Key back to Private Key is hypothetically impossible, Bitcoin community came up with an additional layer of protection with Bitcoin Addresses. Bitcoin Address serves the same purpose and is derived from Public Key applying SHA-256 Algorithm.

Generate Bitcoin Address

Now having Public Key and Bitcoin Address, we can share both of them with others. However, just because Bitcoin Addresses give us more protection (in a way they are harder to reverse back to Private Key) bitcoin users tend to share only their Bitcoin Address.

Summary

Bitcoin Address is derived from Public Key by applying SHA-256 Algorithm. It gives us more protection against having our Private Key stolen. Bitcoin Address just like Public Key lets others send you bitcoins directly to your wallet.



Congratulations, you have made it this far! I can’t wait to see you in other posts too. Keep up the great work on discovering the revolutionary Blockchain technology.