How Bitcoin works: the blockchain explained
Bitcoin private keys: how a payment proves it is really yours
Anyone can send a Bitcoin payment to the network, even one that spends somebody else's bitcoin. So why does a stranger fail when he tries to spend yours?
-
1
The stranger's payment reaches Miva's node: "Rono pays me 10 bitcoin." Before the node writes anything in its ledger, it checks one thing.
-
2
Your wallet app holds no bitcoin. It holds a secret: a very long number made only for you. This number is your private key, and nobody else has it.
-
3
When you pay Rono, your phone uses the key to sign the payment. The signature is a number made from the key and from this exact payment.
-
4
Every node checks the signature against your address, the public name of your bitcoin in the ledger. The check works without the key, so no node ever sees your secret.
-
5
The stranger has no key for Rono's bitcoin. He cannot make a signature that passes the check, so every node throws his payment away.
-
6
He cannot reuse your signature either. It fits only the payment it was made for. Change one number, and the check fails.
-
7
So nobody can spend your bitcoin without your key. But a key only proves who signs. It cannot tell whether you already spent that bitcoin.
-
Quick check
Over your shoulder.
Show the answer
Yes. The nodes only check the signature, and with your key anyone can make one. Keep the key as secret as a password.
-
Go further
Two more words about keys.