1

Trying to get my head around her royal Bitcoin here...

I understand that blocks of transactions are broadcast to the network, and that miners verify that the BC is 'spendable' by trawling the blockchain and following the wallet address's transaction history (or at least I assume that's how it works).

But how does one actually verify that the BC transaction has been signed by it's owner when the miners don't have access to the private key? To put it simpler, how can verification take place without processing both the public and private keys?

I'm probably misunderstanding PKI encryption, but (say) with SSH, the private key would be on a trusted server and verification would take place on that server. How can that possibly work in a distributed network?

2
  • SSH uses public key cryptography in two contexts - clients proving to the server that they're who they say they are, and servers proving to clients that they're who they say they are. Which one are you trying to make an analogy with?
    – Nick ODell
    Feb 20, 2015 at 18:07
  • @NickODell I was being a little dense with this analogy. I was forgetting that the private key is never actually sent to the server; it's simply used to encrypt a bipartisan message between the machines.
    – shennan
    Feb 20, 2015 at 22:25

2 Answers 2

3

Bitcoin transactions are not encrypted, they are cryptographically signed.

You can use a public/private keypair 2 ways: (massive simplification warning)

  • Encrypt a message using a public key and then decrypt it with a private key
  • Sign a message using a private key and validate the signature with the public key

The second method is the one that is used by Bitcoin. A message is placed in the distributed ledger that bitcoins have been sent from X to Y (and typically Z), and signed by the private key of X. X is the source bitcoin address, Y is the destination, and Z is the change address.

1
  • 1
    Maybe even note that the algorithm being used for signatures by Bitcoin (ECDSA) cannot even be used for encryption. Many people think signing is "just encrypting with the private key instead of the public key", but that only works for RSA. Feb 20, 2015 at 19:50
0

Bitcoin scriptSig's carry everything they need in order to satisfy the scriptPubKey that encumbers an output. As such they are regarded as stateless, ie, self contained.

Whenever a signature needs to be verified, the public key is exposed in the script, giving other nodes what they need to validate the transaction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.