Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is a Digital Signature?

A digital signature uses a private key to produce a value that anyone can verify with the matching public key, proving who created a message and that nobody has altered it since.

Illustration for the cybersecurity term Digital Signature
Home / Blog / Cybersecurity Terms / What Is a Digital Signature?
17 November 2026

What Is a Digital Signature?

What Is a Digital Signature?

A digital signature is a value computed over a message with a private key, which anyone holding the matching public key can verify. A successful verification establishes three things at once: the message has not changed by a single bit, it was produced by the holder of that private key, and the signer cannot credibly deny having produced it. The last property, non-repudiation, is what makes signatures useful in law and in audit, and it is also why protecting the private key matters so much.

Note what a signature is not. It does not hide the message — signed data is readable by anyone — and it says nothing about whether the signer should be trusted, only about who they are.

Hash Then Sign

Signing a 500 MB file directly with RSA would be absurdly slow and, for RSA, impossible beyond the modulus size. Every practical scheme therefore hashes first:

  1. Compute a cryptographic hash of the message, typically SHA-256.
  2. Apply the signing operation to that digest with the private key, including a padding or encoding step.
  3. Transmit the message, the signature, and usually the signer’s certificate.
  4. The verifier recomputes the hash, performs the public key operation, and compares.

This makes the signature only as strong as the hash function. If an attacker can find two documents with the same digest, a signature on one is a valid signature on the other. The Flame espionage malware, discovered in 2012, exploited exactly that with an MD5 chosen-prefix collision to forge a Microsoft code-signing certificate, and the SHAttered research of 2017 produced two different PDF files sharing a SHA-1 digest.

The Algorithms in Use

SchemeSignature sizeNotes
RSA-PSS256–512 bytesThe correct RSA padding; prefer it over PKCS#1 v1.5 in new designs
ECDSA (P-256)64 bytesWidely supported; depends critically on a fresh random nonce
Ed2551964 bytesDeterministic, fast, and the hardest of the three to misuse
ML-DSA2.4 kB and upPost-quantum, standardised as FIPS 204 in August 2024

The ECDSA caveat is not theoretical. Each signature needs a unique, unpredictable nonce, and reusing one reveals the private key outright. Sony learned this when the PlayStation 3 firmware signing key was recovered in 2010 after a fixed nonce was found in the implementation, and biased nonces in smart cards and wallets have produced the same result several times since. Deterministic nonce generation under RFC 6979, or Ed25519, removes the hazard by construction.

Digital, Electronic, and Legal

The terms are often conflated and are not the same thing. An electronic signature is any mark indicating intent to sign, including a typed name or a scanned image. A digital signature is the cryptographic mechanism described here. One can implement the other, but a tick box in a web form is an electronic signature with no cryptographic protection at all.

In the UK, section 7 of the Electronic Communications Act 2000 makes electronic signatures admissible in evidence, and the Law Commission confirmed in 2019 that they can satisfy a statutory requirement for a signature in most cases. The eIDAS framework was retained in UK law after Brexit, so the three tiers — simple, advanced, and qualified — still apply, with qualified signatures requiring a certificate from a qualified trust service provider on the UK trust list. Since 1 January 2021 an EU qualified signature no longer carries automatic qualified status in the UK, and the reverse is also true, which matters for cross-border contracts.

Where Signatures Are Load-Bearing

How Verification Fails in Practice

The common defects are in the verifying code, not the maths: accepting the none algorithm, trusting the algorithm field supplied by the attacker, verifying the signature but not checking who signed it, ignoring expiry and revocation, or comparing digests with a non-constant-time function. A signature check that returns true for everything is indistinguishable from a working one until somebody tests it, which is a standard item in our web application security services.

FAQ – Frequently Asked Questions

What Is the Difference Between a Digital Signature and an Electronic Signature?

An electronic signature is a legal concept covering any indication of intent to sign, including a typed name or a drawn squiggle. A digital signature is a cryptographic technique that mathematically binds a signer’s key to specific content. Digital signatures are one way to implement a legally effective electronic signature, and the only way to prove the content has not changed.

Can a Digital Signature Be Forged?

Not against a sound algorithm with a protected key. Forgery in practice means stealing the private key, exploiting a weak hash to create a colliding document, abusing a buggy verifier, or tricking a signer into signing something they did not read. Protect the key in hardware, use SHA-256 or stronger, and test the verification path.

How Long Does a Signature Remain Verifiable?

Only as long as the algorithms stay sound and the certificate chain can still be evaluated. Long-term formats such as PAdES-LTA attach timestamps and revocation data at signing time, so verification does not depend on the certificate authority still answering queries a decade later. Without that, an archived signature becomes unverifiable rather than invalid.

Should I Use RSA or Elliptic Curve Signatures?

Ed25519 where both ends support it: it is fast, compact, and avoids the nonce pitfalls of ECDSA. ECDSA with P-256 where broader compatibility is needed. RSA-PSS where a counterparty or hardware requires RSA. For anything expected to remain valid well into the 2030s, plan for ML-DSA alongside the classical scheme.

Related Terms

You May Be Interested In These

What Is Dependabot?

Cybersecurity Terms

17 November 2026

What Is Dependabot?

Read More
What Is CCTV Security?

Cybersecurity Terms

17 November 2026

What Is CCTV Security?

Read More
What Is Hydroelectric Control System Security?

Cybersecurity Terms

17 November 2026

What Is Hydroelectric Control System Security?

Read More