LearnViz CompSci
Home / Learn / Security & Cryptography / Digital Signatures

Intermediate Topic 19 of 51 Security & Cryptography

Digital Signatures

Proving origin and integrity with private keys.

How it works

A digital signature proves that a message came from the holder of a private key and has not been altered. The signer hashes the message and transforms the hash with their private key; anyone can verify the result with the public key. Algorithms include RSA-PSS, ECDSA and EdDSA such as Ed25519. Signatures provide authenticity, integrity and non-repudiation, since the signer cannot plausibly deny having signed.

Step-by-step walkthrough

  1. The signer hashes the document.
  2. They encrypt the hash with their private key, the signature.
  3. The document and signature are sent.
  4. The verifier decrypts the signature with the public key.
  5. If it matches a fresh hash, the origin and integrity are proven.

Where it is used

Software and firmware updates, TLS certificates, signed documents and contracts, email with S/MIME, package registries and blockchain transactions use signatures.

Common pitfall

Signing a hash of untrusted data without understanding what it covers can authorize unintended actions. Verifying with an untrusted public key proves nothing, so a trust chain or certificate is needed. Weak randomness in ECDSA nonces has leaked private keys. Protect signing keys in hardware security modules, include timestamps and handle key revocation.

Where it fits in the course

Digital Signatures is topic 19 of 51 in Security & Cryptography, rated Intermediate. It follows SHA Family. The next topic is Public Key Infrastructure.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Security & Cryptography quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Digital Signatures?
Proving origin and integrity with private keys. It belongs to Security & Cryptography and is an intermediate-level topic.
Where do people use Digital Signatures?
Software and firmware updates, TLS certificates, signed documents and contracts, email with S/MIME, package registries and blockchain transactions use signatures.
What is the most common mistake with Digital Signatures?
Signing a hash of untrusted data without understanding what it covers can authorize unintended actions.
What should I learn before this topic?
Start with SHA Family, the topic just before it in Security & Cryptography.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Security & Cryptography quiz.
Is Digital Signatures hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn Digital Signatures?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Digital Signatures?
SHA Family, Public Key Infrastructure, Hash Functions are closely connected. The full list is in the related topics section of this page.
What should I study after Digital Signatures?
Continue with Public Key Infrastructure, the next topic in Security & Cryptography.

Related topics