The bedrock of Bitcoin self-sovereignty is having control over your private keys. Without this, in one way or another, you are relinquishing control of your money to someone else. “Not your keys, not your coins” as the saying goes. A counter-intuitive aspect of Bitcoin for people who aren’t familiar with the technical underpinnings of it is “where” your Bitcoin actually is. When people think of a wallet, they think “the place where I keep my money.” Your bitcoin wallet doesn’t actually “hold” your Bitcoin, it just stores your private keys. Your Bitcoin is just entries of data on the blockchain hosted by everyone participating in the network. When you go to spend your bitcoin, what you are actually doing is proposing an update to the data stored on the blockchain. A private key is how the protocol ensures that you, and you alone, can authorize an update to the blockchain that spends your Bitcoin.

So what are your private keys? Just very large numbers. Extremely large. This is a private key in binary:

1110001011011001011110111100000101000100000010001001111010111011010101110111001111111111101010111010010111010011101001110010100110111101000110000111110101111001101001011110011011101000001101101101110001101000110001111010001001001111011010101011001101101010

256 random 1s and 0s. This random number is what ultimately secures your Bitcoin. It might not look like much, but its randomness is what ensures your wallet’s security. There are almost as many possible Bitcoin private keys as there are atoms in the visible universe. That is how many numbers a computer would have to count through to generate and catalog all the private keys potentially possible. As long as the process used to generate the keys is truly random, your keys are safe.

This is what a private key looks like in hexadecimal (binary uses two digits to encode a number, 1 and 0, hexadecimal uses 16 digits, 0-9 and A-F):

E2D97BC144089EBB5773FFABA5D3A729BD187D79A5E6E836DC68C7A24F6AB36A

This is what a private key looks like in uncompressed Wallet Import Format (WIF):

5KYC9aMMSDWGJciYRtwY3mNpeTn91BLagdjzJ4k4RQmdhQvE98G

WIF format is how everyone used to interact with their private keys in the early days of Bitcoin. In this era, you could generate one private key at a time, and then you’d generate the public key from that. The process of generating a public key is essentially just the multiplication of very large numbers but there is a bit more to it than that.. All public keys are an x and y point on a graph showing a very, very large curve that loops back on itself.

On the graph curve, in Bitcoin’s case Secp256k1, there is a point called the “generator point.” This generator point can be thought of as the “base point” on the Secp256k1 curve. It is integral to the process of generating keys and signing with them. This is what the generator point is for Bitcoin’s curve:

G = 02 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798

To generate the…



Source link