You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode What is Bitcoin? Money with no bank keeping the accounts

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. 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.Rono to me: 10Miva's node

    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. 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.private keya secret number,up to 78 digits long

    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. 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.you to Rono: 0.01signatureyour key

    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. 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.nodeyou to Rono: 0.01your addressno key needed

    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. 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.a strangerRono to me: 10node

    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. 6 He cannot reuse your signature either. It fits only the payment it was made for. Change one number, and the check fails.you to Rono: 0.01copiedyou to Rono: 0.5

    He cannot reuse your signature either. It fits only the payment it was made for. Change one number, and the check fails.

  7. 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.youB0.01you to Rono: 0.01to someone else?

    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.

  8. Quick check

    Over your shoulder.Someone reads yourprivate key overyour shoulder. Canthey spend yourbitcoin?

    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.

  9. Go further

    Two more words about keys.walletthe app or device that keepsyour keys and signs yourpayments. The bitcoin stayin the ledgeraddresspublic keya number made from yourprivate key. Your addressis made from it, and nodesuse it for the check

    Two more words about keys.

Next episode The double-spending problem: why digital money is so hard to make

Share this comic

More comics