Cybersecurity Fundamentals series — Part 4. This post continues Part 1: A Complete Beginner’s Guide, Part 2: Security Controls, and Part 3: The CIA Triad. Each post in the series takes one topic and covers it in depth. This one covers how a sender can be held to a message: non-repudiation, built on hashes and digital signatures.

Non-repudiation means a sender cannot credibly deny having sent a message or taken an action, because there is proof of what was sent (integrity) and proof of who sent it (origin). The tools that provide it are hashing and digital signatures.

Imagine you receive an email that says “You’re hired, Bob,” with a start date and a salary. A week later, the manager says they never sent it. How could you prove they did? On paper, a signature on the offer letter would settle the question. In digital systems, the same job is done with digital signatures, and the goal they serve is called non-repudiation.

In Part 3, you learned about the CIA triad, and that integrity is about knowing data has not changed. Non-repudiation builds on integrity by adding one more fact: who it came from. Some courses treat it as part of integrity, and others list it as a separate goal. Either way, it relies on the same two ideas.

The Two Things Non-Repudiation Needs

PropertyThe question it answersWhat provides it
Proof of integrityIs this exactly what was sent, with no changes?A hash of the data
Proof of originWho really sent it?A digital signature made with the sender’s private key

Neither one is enough alone. Proof of integrity without origin tells you the data was not altered, but not whose it is. Proof of origin without integrity tells you who sent something, but not whether it was changed on the way. Together, with strong assurance, they let you say: this exact content came from this exact person, and they can’t plausibly say otherwise.

Step 1: Hashing Proves Integrity

A hash function takes any amount of data and produces a short, fixed-size value, called a hash, digest, or fingerprint. Two properties matter here:

  • The same data always gives the same hash.
  • Change even one character, and the hash changes completely.

You can try it with OpenSSL, a free tool that comes with most Linux and macOS systems, and is available for Windows:

printf "You're hired, Bob" > message.txt
openssl dgst -sha256 message.txt
SHA2-256(message.txt)= ef8b68a4b1e0d561814359be6633b70d6e28b7c3457c18013eda59de2cbbda2a

A receiver can compute the hash of what arrived and compare it with the hash the sender published. A match means the file is intact. This is how you can check a downloaded file against the checksum on a publisher’s website (see Part 3 for the commands).

The Limit of a Hash

A hash proves the data did not change, but it does not prove who sent it. Anyone can compute a hash of anything, including an attacker who changes the message and then computes a new hash to match. For origin, you need something only the sender can do.

Step 2: Digital Signatures Prove Origin

A digital signature is like signing a contract with a pen, except the signature is made with math, and it covers the exact content of the document.

It uses a key pair:

  • The private key is known only to the signer. Nobody else has a copy.
  • The public key is shared with everyone. It can verify signatures, but it cannot create them.

How a Signature Is Created

Using the example of Alice sending the message “You’re hired, Bob”:

  1. Alice’s software computes the hash of the message.
  2. It encrypts that hash with Alice’s private key. The result is the digital signature.
  3. Alice sends the original message together with the signature.

How a Signature Is Verified

When Bob receives the message:

  1. Bob uses Alice’s public key to decrypt the signature, which reveals the hash Alice created.
  2. Bob computes the hash of the message he received, using the same algorithm.
  3. Bob compares the two hashes.

If they match, two things are true: the message was not changed (integrity), and it was signed by whoever holds Alice’s private key (origin). Because only Alice has that key, she cannot credibly claim someone else sent it.

In practice, you rarely do these steps by hand. Email programs, document tools, and software installers have an “add a digital signature” setting, and the math happens behind the scenes. Modern algorithms such as Ed25519 also handle hashing internally, so you hand over the message and the key, but the idea is the same.

Try It: Sign and Verify a Message

This demo uses OpenSSL and the Ed25519 signature algorithm. Run it in a new, empty folder. It creates a key pair, signs a message, verifies it, and then shows what happens if the message is changed.

# 1. Create Alice's private key, then extract her public key
openssl genpkey -algorithm ED25519 -out private.pem
openssl pkey -in private.pem -pubout -out public.pem

# 2. Alice signs the message with her private key
printf "You're hired, Bob" > message.txt
openssl pkeyutl -sign -inkey private.pem -rawin -in message.txt -out message.sig

# 3. Bob verifies it with Alice's public key
openssl pkeyutl -verify -pubin -inkey public.pem -rawin -in message.txt -sigfile message.sig
Signature Verified Successfully

Now change the message and try again with the same signature:

printf "You're fired, Bob" > tampered.txt
openssl pkeyutl -verify -pubin -inkey public.pem -rawin -in tampered.txt -sigfile message.sig
Signature Verification Failure

The verification fails because the signature no longer matches the content. Keep private.pem secret. Anyone who gets it can sign messages as Alice. The signature file (message.sig) is 64 bytes for Ed25519, and the public key can be shared freely.

Why a Shared Secret Is Not Enough

There is a simpler tool called an HMAC, which uses one shared secret key to create a tag that proves a message was not altered and came from someone who knows the key. It is useful, but it cannot give non-repudiation:

import hmac
import hashlib

key = b"shared-secret"
message = b"You're hired, Bob"

tag = hmac.new(key, message, hashlib.sha256).hexdigest()
print(tag)

# Anyone who knows the shared key can produce the same tag
copy = hmac.new(key, message, hashlib.sha256).hexdigest()
print(hmac.compare_digest(tag, copy))
90471d5af5939deadf57d116e19aac733a6b78948a328bee2c5a363f085e7b87
True

Both Alice and Bob know the shared key, so either of them could have produced that tag. If there is a dispute, nobody can prove which one did. With a digital signature, only the holder of the private key can create the signature, so it points to one person.

The Missing Piece: Trusting the Public Key

Verification only means something if you know the public key really belongs to Alice. Otherwise, an attacker could give you their own public key and claim it is Alice’s. The usual solution is a digital certificate, issued by a trusted certificate authority (CA). A certificate is a signed statement that “this public key belongs to this person, website, or organization.” This is the same system that makes the padlock in your browser work, as described in the Cloudflare guide.

Where You See Non-Repudiation

  • Signed email and documents: signed PDFs, contracts, and S/MIME email
  • Software updates and code signing: your computer checks that an installer really came from the publisher and was not changed
  • HTTPS and certificates: websites prove their identity to your browser
  • Git commit signing: developers prove a change came from them (see Mastering Git)
  • SSH keys: a private key proves you are the person logging in (see what SSH is)
  • Audit logs and financial transactions: signed or protected records that show who did what

Limits and Cautions

  • Protect the private key. If it is stolen, an attacker can sign as you, and the proof points to the wrong person. Store keys securely, protect them with a passphrase or hardware device, and have a plan to revoke a key that is lost or stolen.
  • A signature proves a key was used, not that a human was present. Strong authentication, such as two-factor authentication, helps connect a key to a person.
  • Technical proof is not the same as legal proof. Whether a digital signature holds up in a legal dispute depends on the laws of your country and the circumstances. For legal use, ask a qualified professional.
  • The strength depends on the algorithms. Old hash functions and short keys can be broken. Use current, well-reviewed algorithms.

Practice: Which Property Is It?

  1. A website posts a checksum next to a download so you can check the file.
  2. An email program shows “signed by Alice” with a valid certificate.
  3. Two servers share a secret password to authenticate each other’s messages.
  4. A developer signs a software release so users can confirm it came from them.

Answers

  1. Integrity (a hash), with no proof of who made the file unless the checksum itself is signed.
  2. Non-repudiation (integrity and origin, backed by a certificate).
  3. Integrity and authentication, but not non-repudiation, because both servers know the secret.
  4. Non-repudiation (a digital signature on the release).

Quick Summary

  • Non-repudiation means a sender cannot credibly deny sending something.
  • It needs proof of integrity (a hash) and proof of origin (a digital signature).
  • The private key signs, the public key verifies, and only the signer should ever hold the private key.
  • A shared secret (HMAC) can’t provide non-repudiation, because both sides know it.
  • Certificates and certificate authorities let you trust that a public key belongs to the right person.

What’s Next in This Series

Next, the series moves from proving what happened to controlling who can do what: authentication, authorization, and accounting. In the meantime, try the OpenSSL demo above, then change one character in the message and watch the verification fail.

For another explanation, Professor Messer offers a free video lesson as part of his CompTIA Security+ SY0-701 course: Non-repudiation.

Conclusion

Non-repudiation is what turns “someone sent this” into “this person sent exactly this.” A hash shows the data is intact, and a digital signature, made with a private key only the sender holds, shows who it came from. Together, they let people trust messages, software, and records without having to trust the network in between. The key to the whole system is simple: keep private keys private, and make sure the public key you are checking against really belongs to the right person.

Next in the Cybersecurity Fundamentals series: Authentication, Authorization, and Accounting (AAA) Explained, how access is verified, limited, and recorded.

Cybersecurity Fundamentals series: Part 1: A Complete Beginner’s Guide · Part 2: Security Controls · Part 3: The CIA Triad · Part 4: Non-Repudiation · Part 5: Authentication, Authorization, and Accounting · Part 6: Gap Analysis · Part 7: Zero Trust · Part 8: Physical Security · Part 9: Deception and Disruption