2

I'm trying to understand how Bitcoin works under the hood, but there's something I don't get at all, and can't find it.

Suppose I own address A (I have the public key, A-public, and the private key A-private) and I want to transfer 1 BTC to address B (I know its public key, B-public).

In order to be able to do the transaction, I must, somehow, prove that I own A, and the only way to do that is to show A-private. But, if I show A-private, then I'm exposing my private address, so, someone, somehow, could get it.

To sum up: in the Bitcoin blockchain, how do I prove that I own a certain amount of bitcoins without exposing my private key? Or, alternatively, how does the Bitcoin protocol handle that?

3

In Public-Private Key Cryptography, you can use your Private Key, (without sharing it with anyone), in a way to create a message that is completely tied to your Public key.

Anyone can look at that message, and your Public key, and deduce that the only way that message could be generated is by someone who knows the Private key, even though they don't know what the Private key is.

The fact that the message can be confirmed with your Public key proves that you must know the Private key, and must be the owner of the Public Key and the Wallet Address.

Think of it as a lock that is left closed all the time. You can unlock the lock anytime with your secret key, without showing anyone your key.

Anyone can look at that lock, and come to the conclusion: "This lock must have been opened by the owner who has the key; no one else could have opened it", but you still never shared the key with anyone.

  • This is the exact response I was looking for. – Jose Jun 8 '17 at 9:57

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.