Bitcoin Explained #5 - How Are Keys Made?

Greetings guys! Last time, we spoke about keys, an integral part of Bitcoin! They are basically the IDs of your account, and are what allow you to make and receive transactions.

Today, we will try to look a little deeper into that – how exactly do these keys work? How are they made, for instance? What part does cryptography play in the whole thing?

This article will explore that. There’s a bit of math here, but I simplify things as much as I can, don’t worry!

Let’s get started, shall we?

1 – Keys are made through cryptography

Cryptography, for the uninitiated, is the art of using codes to transmit information. These codes can take many shapes and sizes.

Frankly, I could spend the entire article speaking about cryptography, and only give you a whiff. So let me boil down how it works for Bitcoin – it allows for the making of private keys that can’t ever be figured out by anyone.

For those of you that don’t remember the last article, a private key works basically like the PIN code of your bank account (whereas the public key is the bank account number). With the private key, transactions are made from the funds you have in the blockchain. It is the single most important of the two, and you can’t let it ever fall into the wrong hands.

Therefore, this key needs to be made the safest out of the two. How does this system do so?

2 – Public keys are derived from the private ones

Ever heard of prime number exponentiation? Elliptic curve manipulation? These are mathematical formulas that are quite interesting – in the sense that with them, you can convert a number A into number B, but can never figure out A from B. How does that relate to Bitcoin? Let’s see.

What are these keys I keep speaking of? The private key, for starters, is a number. A simple number, picked at random between 1 and 2256. This number then generates signatures, that prove your ownership of funds in a transaction, and thus allows you to make it.

The public key is made off of the private one. Basically, you take the private key and put it through a mathematical function called elliptic curve multiplication, as I’ve said. I won’t explain the details of this function here – look it up if you want, it’s too complex to do it here without detracting from the point. The important thing is, after this is done, you can’t get the private key from the public key that easily, keeping your account safe.

After this, however, the public key goes through a change of its’ own – to make the address that you use to get bitcoins.

3 – Your address is derived from the public key

The public key then goes through another transformation. This time, it gets subjected to what is called a hashing algorithm. Hashes are used consistently throughout the whole system of Bitcoin.

It’s basically a one-way algorithm that transforms a number into something else. It uses SHA256 and RIPEMD160 algorithms to achieve this – again, look these up on your own if you want.

That address is now what will be used whenever people want to send you money. And the beauty of the situation is, you can never work from the address, available to all, back to the public key, and then back to the private key, which is critical for you. Through simple mathematics, your safety is assured…

…but there is more to this. Find out next time!!

That wraps this up!

That's all for today! Sorry for the massive delay in making this article, I'm swamped in work! Will try to keep posting regularly, but my article length will probably go down a bit... making time for everything is difficult :(

Still, I love you guys, and will do my best to keep up! If you have some 2 cents on this article, feel free to sound of in the comments below!

Till the next one guys! Steem on!

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now