-1

I am trying to understand how Bitcoin works, and was wondering how can you prove that a public key is authentic. Here´s what I have in mind to provide more context to my question. Let's suppose I looked at the blockchain and see that Alice has sent a lot of bitcoin in the past. And I want to cause harm to Alice. Let's say that Alice public key is "hjf734hkjf". Then, why I cannot broadcast to the community that the public key "hjf734hkjf" is sending 100 bitcoins to me?

1
  • Why did I get a negative vote? An explanation would be helpful. Commented Nov 12, 2017 at 12:54

2 Answers 2

4

You are not sending with public key.

You broadcast the transaction message that is signed with private key that only the owner of the coins has. (you can consider signing to be analogous to encrypting in the sense of the question)

Public key that everybody knows can verify this message (verifying can be considered analogous to decrypting here). If the verification is successful it is proven that the message is signed with respective private key that only the owner knows. Therefore it is sure that the owner of coins broadcasted the transaction message.

This process is known as digital signing.

0
1

Then, why I cannot broadcast to the community that the public key "hjf734hkjf" is sending 100 bitcoins to me?

That is not how Bitcoin works.

First of all, you do not send from a public key or an address. That idea is related to traditional "accounts", but Bitcoin does not use any sort of accounts system at the protocol level.

When you receive Bitcoin, what is actually happening is that a transaction creates transaction outputs which you are allowed to spend. The vast majority of transaction outputs require that the spending transaction contains a digital signature which corresponds to a specified public key. The digital signature is can only be produced by the private key that corresponds to the public key, so if you do not have the private key, you cannot create the signature that allows you to spend from that transaction output.

So if you see Alice owns the public key "hjf734hkjf" which can spend from transaction outputs with a value of 100 Bitcoin, you can't spend those 100 Bitcoin because you do not have the private key that corresponds to the public key "hjf734hkjf" and cannot create a valid digital signature. Thus any transaction that you do try to create that spends those transaction outputs will be completely invalid and rejected by full nodes and miners.

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.