0

I understand that if Bob gets a transaction (BTC) from Alice and want to send it to Charlie he must provide a key which proof that he is the owner of the transaction. But in what stage Bob actually signed the transaction? Can it be that Alice was the one who signed the transaction for Bob without knowing his private key?

1

Every bitcoin is locked by output script. Only when the result of output script returns true, bitcoin is allowed to spend.

In your case first bitcoins are locked with Alice's private key. Which means output script will return true only if Alice had signed the transaction with her private key. Alice signs the transaction with her private key to Bob's public key, and this will unlock the bitcoin as Alice has provided her private key and new output script will be generated for this bitcoin, which can be unlocked by Bob's private key.

Now, when Bob wants to spend bitcoin which is locked by his private key, he can sign the transaction with his private key to Charlie's public key.

  • "...and new output script will be generated for this bitcoin, which can be unlocked by Bob's private key." - So basically you don't need a privet key in order to lock (sign) a message? – Arik Malachi Jan 14 '18 at 20:47
  • Yeah. To lock bitcoin you only need public key. To unlock you have to pass your signature which is signed by your private key. – Preet Jan 14 '18 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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