1.4
In progress
Digital Signatures
Summary
A digital signature proves who created a message and that it hasn't changed since. The signer hashes the message and signs the hash with their private key; anyone can verify it with the signer's public key. Signatures provide integrity, authentication and non-repudiation, but not confidentiality.
In plain words
A digital signature proves who sent a message and that it wasn't changed. The sender hashes the message and signs the hash with their private key. Anyone can check it with the sender's public key.
Detailed explanation
- Digital signature: A value created with a private key over a message's hash that anyone with the public key can verify.
Signing and verifying
- 1. Hash: The sender hashes the message.
- 2. Sign: The sender signs the hash with their private key.
- 3. Send: The message and signature travel together.
- 4. Verify: The recipient hashes the message, checks the signature with the sender's public key and compares the results.
What it proves
- Integrity: Any change to the message makes verification fail.
- Authentication: Only the holder of the private key could have produced the signature.
- Non-repudiation: The signer can't plausibly deny signing, provided the private key was protected.
Standards
- RSA signatures: Defined in PKCS #1; widely used in certificates and code signing.
- Digital Signature Algorithm (DSA): A US government signature standard; FIPS 186-5 (2023) no longer approves it for new signatures.
- Elliptic Curve Digital Signature Algorithm (ECDSA): The elliptic curve version, giving strong signatures with small keys.
- EdDSA: A modern elliptic curve signature scheme, such as Ed25519.
Important terms
taken from the text above- Digital signature
- A value created with a private key over a message's hash that anyone with the public key can verify.
- Integrity
- Any change to the message makes verification fail.
- Authentication
- Only the holder of the private key could have produced the signature.
- Non-repudiation
- The signer can't plausibly deny signing, provided the private key was protected.
- RSA signatures
- Defined in PKCS #1; widely used in certificates and code signing.
- Digital Signature Algorithm (DSA)
- A US government signature standard; FIPS 186-5 (2023) no longer approves it for new signatures.
- Elliptic Curve Digital Signature Algorithm (ECDSA)
- The elliptic curve version, giving strong signatures with small keys.
- EdDSA
- A modern elliptic curve signature scheme, such as Ed25519.
Examples & real-world scenarios
- Signed software updates, so your computer can check the publisher.
- Signed email with S/MIME.
- Standards: RSA (PKCS#1), DSA and ECDSA.
Scenario
A contract PDF is signed and emailed. The recipient's software checks the signature: it matches, so the document is unchanged and came from the signer's key. The signer can't later deny signing, which gives non-repudiation.
Common mistakes
- Thinking a signature hides the content. It proves origin and integrity, not confidentiality.
- Mixing up which key signs (private) and which verifies (public).
Practical skills
- Walk through signing and verifying step by step.
What I should remember
- Digital signature: Signed with the sender's private key, verified with their public key.
- Non-repudiation: Provided by digital signatures because only the signer holds the private key.
- Confidentiality: Not provided by a signature; encrypt as well if secrecy is needed.
- ECDSA: Elliptic curve signatures with short keys.