Who is checking if your password is correct?

Please read before continuing: Technical Explanation of Bitcoin, Addresses, Private Keys

 

Ready to learn about cryptography?

In the traditional financial system, your bank stores your password. This makes it easy to prove that you are the owner of your bank account. Tell your bank what password you want to use, and they will ask for that whenever you want to log in or send money.

passwordcheck.jpg

Since bitcoin doesn’t have any banks or central authority, we need a different way to prove we are the owner of our funds.

Bitcoin’s solution? Math.

Remember back to our lessons on addresses and private keys, because there are a couple things we need to clarify.

  • An address is just the name of your “locker”. You give this out so people know where to send you bitcoin. This address looks like a confusing group of characters because it is actually mathematically derived from your password.

  • The “password” needed to unlock bitcoin is actually just a really, really long number. This number is called a private key. Whoever knows this key is able to spend the bitcoin inside the locker it is tied to.

ecc3.png

The thing to remember? A private key and the address it creates are mathematically related.

How does this help us?

If we told someone our password, they would have access to our money. So we need to prove we know our password, without telling anyone our password. Quite the predicament…

Luckily, the mathematical relationship between the private key and the address will help us out us. The actual math behind this is outside the scope of this lesson (what a relief, right?). The important thing to understand is that they are related.

Welcome the Digital Signature

The solution is to provide another piece of information whenever we want to unlock our locker. This extra information is called a digital signature. We won’t dive into how this really works, but we will explain how one might tie together two related objects without knowing what one of them is.

dna.png

The digital signature is kind of like a DNA test. Imagine two criminals rob a house. The police arrive afterwards and collect DNA from two different people. One of the criminals is in their database but the other isn’t. However, the two sets of DNA show that these people are father and son! We know the son’s name because he has a criminal record.. but we do not know the father’s. What we do know is that they are related.

Let’s put it all together.

Private keys and addresses are mathematically related. The “DNA test”, called a digital signature, is proof that a locker is related (or not related) to the password given. All this is possible without knowing what the actual password is. This allows us to supply a digital signature instead of our private key when we want to unlock our locker.

When trying to send our bitcoin, the rest of the network will then check that the digital signature we supplied is valid. If it is, we’ve proved we have the private key and address that are tied to each other and we can unlock our locker, then spend our bitcoin!

signproof.png