Study Guide

Digital Signatures

How a digital signature is created with a private key and checked with the public key, worked through a headteacher's purchase authorisation: what a valid signature proves, why signing is not encryption, and what non-repudiation can and cannot establish.

Lesson 6.4 Cryptography & PKI

A handwritten signature shows who approved a document. This lesson works out how a digital signature does the same job more reliably, what it proves, and what it cannot prove on its own.

Stage: Think

A signed order

Think it through

A headteacher must authorise a £10,000 laptop order, and the IT department will act only on her authorisation. On paper, she would sign it. What should a signature on an electronic order be able to prove?

Show what happens

That the order is exactly what she approved, with nothing changed since, and that it really came from her. A digital signature is designed to show both.

Think it through

In encryption, anyone can lock a message with Bob’s public key. For a signature that only the headteacher could make, which key must do the first step?
Show the answer

Answer: B. Her private key.

Her private key, because only she holds it. Anyone can then check the signature with her public key.

Stage: Explain

The idea

A digital signature is a value, produced with the signer’s private key, that anyone can check with the signer’s public key.

A valid signature shows two things:

  • the content is exactly what was signed, with nothing changed since;
  • it was signed with the private key that matches the public key used to check it.

Check your understanding

What does a valid signature show about a document?
Show the answer

Answer: B. That nothing has changed.

That it is exactly what was signed, with nothing changed since, and that it was signed with the matching private key.

Notice the direction. In encryption, the public key does the first operation and anyone can do it. In signing, the private key does the first operation, and only its owner can. That is the whole point: a signature is something only one party could have made and everyone can check.

Stage: Predict

Signing and verifying, step by step

The headteacher of a fictional school must authorise the purchase of 20 laptops for £10,000. The school’s finance policy says the IT department may place the order only with the headteacher’s signed authorisation. The headteacher has a key pair. The private key is held on a smart card that needs a PIN; the public key is in a certificate issued by the school’s own certificate authority.

Think it through

Signing a whole document directly would be slow. Using what you know about hashing, what could the headteacher sign instead?

Show what happens

A hash of the document: a short digest that changes completely if one character changes. The step-through shows her software signing the digest, and IT checking it.

Signing and verifying a purchase authorisation

Eight steps: three to sign, five to verify. The school, its staff and the purchase are fictional.

  1. Headteacher · signing

    Step 1 of 8: Hash the document

    The signing software computes a SHA-256 digest of the authorisation: a 256-bit fingerprint of its exact contents, including “20 laptops” and “£10,000”.

  2. Headteacher · signing

    Step 2 of 8: Sign the digest with the private key

    The headteacher enters the PIN, and the smart card uses the private key to produce a signature over the digest. The private key never leaves the card.

    Technical detail: Signing the short digest, not the whole document, keeps the operation fast whatever the document’s size.

  3. Headteacher · signing

    Step 3 of 8: Send the document with its signature

    The authorisation, the signature and the headteacher’s certificate go to the IT department. The document itself is not encrypted: anyone who sees it can read it.

  4. IT department · verifying

    Step 4 of 8: Check the certificate

    IT confirms that the certificate names the headteacher, was issued by the school’s certificate authority, is within its dates and has not been revoked. This is what ties the public key to a person.

  5. IT department · verifying

    Step 5 of 8: Hash the document received

    IT’s software independently computes the SHA-256 digest of the document as it arrived.

  6. IT department · verifying

    Step 6 of 8: Check the signature with the public key

    Using the headteacher’s public key from the certificate, the software checks whether the signature is valid for that digest.

  7. IT department · verifying

    Step 7 of 8: Read the result

    Valid: the document is unchanged since signing, and it was signed with the headteacher’s private key. Invalid: the document was altered, or it was signed with some other key. Either way, do not act on an invalid signature.

  8. IT department · verifying

    Step 8 of 8: Keep the evidence

    IT stores the document, the signature, the certificate and the time of verification. If the order is ever questioned, the check can be repeated by anyone.

IT never needs the headteacher’s private key, and no secret is shared between them.

What happens if the document is changed

Suppose that, after signing, someone edits the amount from £10,000 to £19,000 and forwards the document with the original signature attached.

Think it through

Someone changes £10,000 to £19,000 after signing and forwards it with the original signature. What happens when IT checks it?
Show the answer

Answer: C. The check fails.

The check fails: the altered document has a different digest, and the signature was made for the old one.

IT’s software hashes the altered document. One changed character gives a completely different digest. The signature was made for the old digest, so the check fails. Nobody had to notice the edit by eye.

The signature did not prevent the change. It made the change detectable. That is integrity.

Stage: Predict

What a signature provides

Think it through

Does signing a document keep its contents secret?
Show the answer

Answer: B. No, it hides nothing.

No. A signature hides nothing: confidentiality needs encryption as well.

A valid digital signature supports three properties.

PropertyWhat the valid signature shows
IntegrityThe content has not changed since it was signed.
AuthenticationIt was signed with a particular private key, so it came from that key’s holder.
Non-repudiationThere is evidence, checkable by a third party, that makes it hard for the signer to deny having signed.

And one property it does not provide:

  • Confidentiality. A signed document is readable by anyone who receives it. A signature alone hides nothing.

If a document must be both private and signed, it is signed and encrypted, using two different key pairs for two different jobs.

Stage: Explain

Encryption and signing use the keys differently

Check your understanding

Alice signs a message to Bob. Which key does Bob use to check it?
Show the answer

Answer: C. Alice’s public key

Alice’s public key: the signer’s private key signs, and the signer’s public key verifies.

This is the point most often confused, because both use a key pair.

Encrypting for confidentiality and signing for origin

Alice sends Bob a message. The first row keeps it secret from everyone except Bob; the second lets Bob check that it came from Alice. Notice whose key pair is used in each row.

Encrypting (confidentiality)

Uses the recipient’s key pair. Only Bob can read the result.

  1. DataMessage
  2. OperationEncryptKey: Bob’s public key
  3. DataCiphertext
  4. OperationDecryptKey: Bob’s private key
  5. DataMessage

Signing (integrity and origin)

Uses the sender’s key pair. Anyone can read the message and anyone can check it.

  1. DataMessage
  2. OperationHash, then signKey: Alice’s private key
  3. DataMessage and signature
  4. OperationHash, then verifyKey: Alice’s public key
  5. DataValid or invalid

In both rows a private key is used only by its owner. Nobody ever needs another person’s private key.

Do not confuse: Encrypting and signing

GoalEncrypting
Confidentiality. Uses the recipient’s public key; only the recipient’s private key decrypts.
GoalSigning
Integrity and origin. Uses the signer’s private key; anyone verifies with the signer’s public key. Hides nothing.
Go deeper Is signing “encrypting the hash with the private key”?

That description is common, and it is best treated as a loose simplification.

It comes from RSA, where the signing calculation is mathematically similar to the decryption calculation. Even with RSA, a real signature uses its own padding scheme and is not interchangeable with encryption. Other signature algorithms, such as ECDSA and EdDSA from the elliptic-curve family, involve no encryption step at all.

The description also misleads in a practical way: it suggests the content is being hidden. It is not. The accurate statement is that the private key signs and the public key verifies.

Good practice follows from this: an RSA key pair should be used either for signing or for encryption, not both, and many systems issue separate certificates for the two purposes.

Stage: Predict

Non-repudiation: evidence, not certainty

Some weeks later the laptops arrive, the invoice is larger than the budget allowed, and the headteacher says: “I never approved that purchase.”

Think it through

The headteacher says, “I never approved that purchase,” but the signature verifies. What does that prove, and what can it not prove on its own?

Show what happens

It proves the document is unchanged and was signed with the private key matching her certificate. On its own it cannot show whose hands were on the key, whether the certificate was issued correctly, when it was signed, or whether she understood what she signed.

The IT department produces the stored document, signature and certificate. The signature still verifies. What does that establish?

What the evidence shows

  • The document is exactly the one that was signed: 20 laptops, £10,000.
  • It was signed with the private key that matches the public key in the headteacher’s certificate.
  • Nobody could have produced that signature without that private key.

What it cannot show on its own

  • Whose hands were on the key. The signature proves that a key was used, not that a person used it. If the smart card was lent to a deputy, left in a reader with the PIN written on a note, or copied by malware, someone else could have signed.
  • That the certificate was right. If the school’s certificate authority issued a certificate in the headteacher’s name to the wrong person, the signature is valid and the conclusion is wrong.
  • When it was signed, unless a trustworthy timestamp was recorded. That matters if the key was later reported stolen.
  • That the signer understood or intended it. A person can be deceived into signing something.

So the careful wording is that non-repudiation provides strong evidence, not an unconditional guarantee. How strong depends on everything around the signature.

What strengthens the evidenceWhy
The private key is kept in hardware and needs a PINIt is hard for anyone else to use the key.
The key is never shared, by policy and in practiceThe key points at one person.
A trusted timestamp is attachedThe time of signing can be shown.
Certificates are issued carefully and revoked promptlyThe link between key and person can be relied on.
Logs record the signing device and sign-inIndependent records support the same account of events.

Check your understanding

The headteacher lent her signing smart card and PIN to a deputy. What does that do to the evidence?
Show the answer

Answer: C. It weakens who signed.

It weakens it: the signature still verifies, but the key no longer points at one person.

Non-Repudiation covers the wider idea, including audit logs and why shared accounts weaken it.

Stage: Predict

Where digital signatures are used

Think it through

A phone refuses to install an update because its signature does not check. What might have happened?

Show what happens

The update did not come from the publisher, or it was altered on the way. Signatures let devices refuse both.

  • Software updates are signed, so a device can refuse an update that did not come from the publisher or was altered on the way.
  • Certificates are signed by a certificate authority. This is how a browser knows whom a public key belongs to, and it is the subject of the next lesson.
  • Secure web connections use a signature during the handshake, so that the server proves it holds its private key.
  • Email can be signed by the sender, and the DKIM control signs messages on behalf of a sending domain.
  • Documents and contracts are signed electronically.

Stage: Explain

Security+ terminology

The CompTIA Security+ SY0-701 exam objectives list Digital signatures under objective 1.4, and Non-repudiation under objective 1.2 among the fundamental security concepts.

The objectives do not spell out the signing steps; the hash-then-sign sequence taught in this lesson is the standard explanation.

Stage: Apply

Apply it in a new situation

These questions use the lesson in situations it has not shown. For the strongest test of your understanding, come back to them on another day and answer each one at the first attempt.

Apply it

A contract must be both private and signed. What is needed?
Show the answer

Answer: C. Sign and encrypt it.

It is signed and encrypted, using two different key pairs for two different jobs.

Apply it

A key was reported stolen on Friday. A document signed with it is disputed. What would help most?
Show the answer

Answer: B. A trusted timestamp.

A trusted timestamp, showing whether the document was signed before the key was reported stolen.

Apply it

A colleague describes signing as “encrypting the hash with the private key, so the content is hidden”. What is wrong?
Show the answer

Answer: B. Signing hides nothing.

Signing hides nothing. The accurate statement is that the private key signs and the public key verifies.

Stage: Check

Check your understanding

These questions come from the approved revision bank. They were approved under owner-authorised delegated review: the site owner authorised the review and did not read each question individually.

  1. A headteacher at a fictional school digitally signs a document authorising the purchase of 20 laptops. Which key creates the signature?

    Show answer

    Answer: The headteacher’s private key

    The signer hashes the content and uses their own private key to produce the signature, and anyone can then check it with the signer’s public key. Only the headteacher should hold that private key, which is what ties the signature to the headteacher. The recipient’s keys play no part in signing; a recipient’s public key is used when encrypting for confidentiality.

    Revision sources: Digital Signatures (Supplementary Study Guide explanation)

  2. A digital signature is normally computed over a digest of the content, not over the whole content directly.

    Show answer

    Answer: True

    True. The signer hashes the content and uses their private key to produce a signature over the digest. Signing a short, fixed-length digest is efficient however large the document is, and any change to the document changes the digest, so the signature still protects all of it.

    Revision sources: Digital Signatures (Supplementary Study Guide explanation)

  3. An IT department receives a purchase authorisation digitally signed by a headteacher. How does it check the signature?

    Show answer

    Answer: Hash the document, then check the signature against that digest with the headteacher’s public key

    To verify, anyone recomputes the digest of the content and checks the signature against it with the signer’s public key. The key that matters is the headteacher’s public key, because the headteacher’s private key made the signature. The department’s own keys are not involved, and a signed document is not encrypted, so there is nothing to decrypt.

    Revision sources: Digital Signatures (Supplementary Study Guide explanation)

  4. After a purchase authorisation is signed, someone changes the amount from £10,000 to £19,000 and forwards the document with the original signature. What happens when the signature is checked?

    Show answer

    Answer: Verification fails, because the new digest no longer matches the signed one

    The signature is made over a digest of the content, and verifying means recomputing the digest and checking the signature against it. Changing the amount changes the digest, so the check fails: that is the integrity property. The signature covers the whole content, not only the signer’s name, and checking it needs the signer’s public key alone.

    Revision sources: Digital Signatures (Supplementary Study Guide explanation)

  5. Which two properties does a valid digital signature support? Select two.

    Show answer

    Answer: Evidence of who signed the content; Integrity of the signed content

    A valid signature shows that the content has not changed since signing and that it was produced with the private key matching the public key used, which gives evidence of who signed. It does not keep the content confidential, and it does nothing to keep the content available.

    Revision sources: Session 9: Cryptographic Algorithms, Public Key Infrastructure and Cryptographic Solutions (Classroom session record) · Digital Signatures (Supplementary Study Guide explanation)

  6. Digitally signing a document prevents people without the key from reading it.

    Show answer

    Answer: False

    False. A valid signature shows integrity and the origin of the content, but it does not keep the content confidential. A signed document can be read by anyone who receives it. Keeping it secret needs encryption as well, which is a separate step from signing.

    Revision sources: Digital Signatures (Supplementary Study Guide explanation)

  7. Which pairing of purpose and keys is correct?

    Show answer

    Answer: Encryption: the recipient’s public key encrypts. Signing: the signer’s private key signs.

    Encryption for confidentiality uses the recipient’s public key to encrypt and the recipient’s private key to decrypt, while signing uses the signer’s private key to sign and the signer’s public key to verify. In both cases the private key is used only by its owner, and nobody needs another person’s private key.

    Revision sources: Session 9: Cryptographic Algorithms, Public Key Infrastructure and Cryptographic Solutions (Classroom session record) · Digital Signatures (Supplementary Study Guide explanation)

  8. A headteacher later denies approving a purchase. The signature on the authorisation verifies with the headteacher’s public key. What does that establish?

    Show answer

    Answer: The headteacher’s private key signed this exact document; who used the key is a separate question

    Non-repudiation is evidence, not an unconditional guarantee: a valid signature shows that a particular private key was used on this exact content, and its weight depends on that key having been under the signer’s sole control. A public key cannot create signatures, so the evidence is far from worthless, and a signature says nothing about confidentiality.

    Revision sources: Session 9: Cryptographic Algorithms, Public Key Infrastructure and Cryptographic Solutions (Classroom session record) · Digital Signatures (Supplementary Study Guide explanation)

Study and revision

Practise through the Cryptography & Data Protection topic. Questions cover which key signs and which verifies, the role of the digest, what happens when signed content changes, the properties a signature supports, signing against encrypting, and the limits of non-repudiation; four flashcards recall the main points. Most are learning-only. The questions that have been verified against CompTIA Security+ SY0-701 objective 1.4 are also in the Security+ practice track; that does not mean the lesson covers the whole of an objective, and the lesson does not establish practical experience.

Stage: Consolidate

What to remember

Key terms

Digital signature

A value produced with a private key that only the signer should hold, which anyone can check with the matching public key to confirm who signed some content and that it has not changed since.

Private key

The half of a key pair that its owner keeps secret. It decrypts data sent to the owner and creates the owner’s signatures.

Public key

The half of a key pair that can be given to anyone. It encrypts data for the key’s owner and verifies the owner’s signatures.

Non-repudiation

Evidence that an action or communication took place and of who performed it, strong enough that the person cannot credibly deny it.

Common misunderstandings

A signature provides no confidentiality. Anyone who receives a signed document can read it.

You sign with your own private key. The recipient’s key pair is used for encryption, which is a different job.

It proves that their private key signed it. Whether the person did depends on how well that key was protected.

It does not prevent a change. It makes any change detectable, because verification then fails.

Further reading

Lesson sources and acknowledgements

Sources and scope

  • Covered in Session 9 (see the Session 9 Learning Log): digital signatures; integrity, authentication and non-repudiation; and the difference between encryption and signing.
  • Accuracy qualifications: a digital signature alone does not provide confidentiality; RSA encryption and RSA signing use the keys for different purposes; non-repudiation provides evidence, not an unconditional guarantee.
  • Independently checked: what a digital signature is for (detecting modification and authenticating the signatory) against NIST FIPS 186-5; the algorithm families named against NIST SP 800-57 Part 1; and the Security+ wording against the published SY0-701 objectives. These are external references, not course evidence.
  • Supplementary explanation: every definition, the headteacher scenario and its eight steps, the altered-amount example, the properties table, the two-row comparison, the note on “encrypting the hash”, the dispute and what the evidence does and does not show, the table of strengthening factors, the list of uses and the misunderstandings. These were developed afterwards and are my explanations, not the tutor’s words. The diagrams are original.
  • Guided version (published 1 November 2026, awaiting the site owner’s editorial review): the opening questions about the headteacher’s order, every question asked in the lesson with its feedback and hints, the application questions and the closing summary are supplementary explanation written for the Study Guide. The settings are fictional. The questions in the lesson’s steps are not revision-bank items; those in “Check your understanding” are, unchanged.
  • No practical work is claimed. The school, the headteacher and the purchase are fictional. I have not created or verified digital signatures as part of this lesson.