Just curious, if I send a transaction from one address to another, how do they verify it without knowing my private key?


2 Answers 2


Bitcoin uses the Elliptic Curve Digital Signature Algorithm (ECDSA). Your private key is used to create the signature and your public key is used to verify the signature. This allows anybody to verify your signature as long as they have your public key.

For more detailed information: Digital Signature Algorithm and Elliptic Curve DSA

  • 1
    According to bitcoin wiki, "A signature is mathematically generated from a hash of something to be signed, plus a private key." In the context of bitcoin, what is the "something" to be hashed here? Is it always the transaction?
    – Aqqqq
    Apr 9, 2017 at 14:26
  • It's a modified version of the spending transaction. It's modified because the spending transaction contains the signature itself, so if not modified, that signature would need to sign itself. Jan 4, 2018 at 7:18

The short answer seems to be correct. But more detailed explanations say that your bitcoin digital signature consists of an encryption of a hash of the tx data together with a hash of your private key.

I don't see why the hash of your private key needs to be included in a digital signature.

See below step will help you and surely this would work:

  1. You create a hash of the tx data. You then sign the hash using your private key. This results in your digital signature.

  2. You then propagate the tx data through the network, together with your digital signature and the corresponding public key needed to verify the signature.

  3. Anyone on the network can then use the public key to verify your signature and recover the hash of the tx data.

  4. They then themselves create a hash of the tx data using the same hash function that you used in step 1.

  5. If their own hash of the tx data matches the hash they recovered by signing with your signature, then that proves that tx hash from your digital signature must have been created by you.

  • There is no encryption involved, at all. Digital signature algorithms are distinct from encryption algorithms. One notable example is RSA, which can both be used for encryption and signing, but this is not true for every system. ECDSA is only for signatures. Jan 4, 2018 at 7:19

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.