Digital Signature vs Encryption
People think a digital signature hides a message, and it does not. Encryption scrambles a message so only the right key can read it. A signature leaves the message open to read. It proves who sent it and that nobody changed it. Many systems use both, one to keep secrets and one to build trust.
Digital Signature
A stamp made with a private key. It proves who sent a message and that nobody changed it.
A digital signature proves who made a message and that nobody changed it. The sender makes it with their private key. Anyone with the matching public key can check it. If even one letter of the message changes, the check fails. Software updates, JSON Web Tokens and HTTPS certificates all carry signatures.
Encryption
Locking data with a key. Only someone with the key can read it.
Encryption scrambles data with a key, so only someone with the right key can read it. Without the key, the data looks like random noise. Unlike hashing, it can be undone, which is the whole point. Data is encrypted in transit, like HTTPS on the web, and at rest, like a phone's storage. AES and RSA are two of the most used methods.
In one line
- Digital Signature
- A stamp made with a private key. It proves who sent a message and that nobody changed it.
- Encryption
- Locking data with a key. Only someone with the key can read it.