How exactly would compromising a private key cause you to lose your coins?

1

When someone sends me coins, they must send it to my wallet address, which is nothing but my public key hashed. It's generally understood that losing your private key implies losing access to your transactions.

Can we please elaborate on the how and why? Because so far all we got is a transaction with a destination of my wallet address. How does the private key allow me or someone else to take control of my unspent outputs?

Rawad Rifai

Posted 2017-10-18T00:08:04.657

Reputation: 33

I meant to add, how do I use my private key later to take control of my unspent transactions?Rawad Rifai 2017-10-18T00:39:43.463

Answers

3

For P2PKH addresses (1.. addresses), the address is the hash of your public key and your public key is derived from your private key. When you spend, you must provide a cryptographic signature and the public key for your address. This cryptographic signature can only be created by using the private key. This is what makes it so that only you can spend your Bitcoin; you have the private key that makes a valid signature so you can make the spending transaction. If you lose that private key, you cannot make the signature and thus cannot make the spending transaction. However anyone who obtains your private key (i.e. steals your private key) can also make that signature and spend your coins, which is why you must keep it safe.

Andrew Chow

Posted 2017-10-18T00:08:04.657

Reputation: 40 910

That's helpful.Rawad Rifai 2017-10-22T07:26:47.047