In this lesson you will learn to:
- Explain what a digital signature proves.
- Describe the sign-and-verify steps.
- Explain why a signature cannot be copied onto another message.
More than a scribble
A handwritten signature can be copied from one document onto another. A digital signature cannot, because it depends on the exact content of the message it signs. Change one character of the message and the old signature no longer fits.
A valid digital signature proves two things at once:
- Authenticity: it was made with the private key that matches a given public key.
- Integrity: the message has not been altered since it was signed.
Signing and verifying, step by step
- The sender takes the message and computes its hash (lesson 2.1).
- Using their private key, they compute a signature from that hash.
- They send the message, the signature and their public key.
- Anyone receiving them recomputes the hash and uses the public key to check that the signature matches. The answer is simply "valid" or "not valid".
Nobody needs to see the private key to check the signature. That is the whole point.
Signatures in a blockchain transaction
A transaction is, at heart, a message: "move this value from here to there". The holder of the relevant private key signs it. Every node that receives the transaction checks the signature before accepting it. If the signature is missing or does not match, the transaction is rejected — no matter who sent it or how many times.
Because the signature covers the whole transaction, nobody along the way can change the destination or the amount. Any change would invalidate the signature.
Signatures in everyday life
You rely on digital signatures constantly. The padlock in your browser depends on certificates that are digitally signed. Software updates on your phone are signed by the manufacturer, and your device refuses unsigned ones. Many countries recognise electronic signatures in law for contracts and official documents.
What a signature does not prove
A signature proves that a key signed the message — not that a particular person did, or that they did so willingly. If someone else obtained the key, their signatures are indistinguishable from yours. That is why the security of keys (module 5) matters as much as the strength of the mathematics.
Key takeaways
- A digital signature proves which key signed a message and that the message was not changed.
- It is created with a private key and checked with the matching public key.
- Every blockchain transaction must carry a valid signature to be accepted.
- A signature proves control of a key, not the identity or intentions of a person.
Check yourself
What two things does a valid signature prove?
That the matching private key made it (authenticity) and that the message has not changed (integrity).
Can a signature be moved to a different message?
No. It depends on the message's hash, so it will not verify against any other content.
Why must a node check signatures?
To reject transactions that were not approved by the holder of the relevant key or that were altered.
Sources
This lesson is for general education about how the technology works. It is not a recommendation to acquire, sell or hold any crypto-asset and is not financial advice.