Digital Signature

A digital signature is a cryptographic technique that signs data with a private key and lets anyone verify it with the matching public key. It shows which key signed a document and that the document has not changed since. Advanced and qualified electronic signatures under the EU's eIDAS Regulation are built on it.

Updated Reviewed by Tomas Zuoza, CEO of ZealiD

What is a digital signature?

A digital signature is a piece of data, calculated from a document and a secret key, that anyone can check with a second, public key. If the check succeeds, two things are established. The signature was made with that particular secret key. Not one character of the document has changed since.

The term comes from cryptography, not from law, and the technique secures far more than contracts. It is how a phone confirms that a software update comes from the manufacturer. It is how a browser checks the certificate a website presents. Signing a PDF is one use among many.

This is where the confusion starts. In everyday speech, "digital signature" is used for anything signed on a screen, including a name typed into a box or a scribble made with a finger. Neither involves a key pair, so neither is a digital signature in the technical sense. The reverse also holds. A server can produce thousands of digital signatures an hour without any person signing anything.

How does a digital signature work?

A digital signature works with two mathematically linked keys and a fingerprint of the document. The private key creates signatures, and the signer keeps it secret. The public key can only check them, so it can be handed to anyone. Knowing the public key does not reveal the private one.

The fingerprint is called a hash. A hash function, such as SHA-256, reduces a file of any size to a short value of fixed length. Change a single comma in a two-hundred-page contract and the hash comes out completely different. Signing the hash is therefore as good as signing the whole document, and much faster.

Signing and verifying then run in a fixed order. The first three steps happen on the signer's side, the last three on the recipient's.

  1. The signing software calculates the hash of the document.
  2. It combines that hash with the signer's private key to produce the signature value. Nobody without the private key can produce a value that will pass the check.
  3. The signature value is stored with the document, usually together with a certificate that contains the signer's public key.
  4. The recipient's software calculates the hash of the document it received.
  5. It tests the signature value against that hash, using the public key.
  6. If the test succeeds, the document is the one that was signed, and the matching private key signed it. If the document or the signature has been altered in any way, the test fails.

None of this requires the two parties to meet or to share a secret beforehand. The recipient needs only the public key, which is why the technique suits signing between people who have never dealt with each other.

What is the difference between a digital signature and an electronic signature?

A digital signature is a technique. An electronic signature is a legal concept. Article 3(10) of the eIDAS Regulation defines an electronic signature as data in electronic form that is attached to or logically associated with other electronic data and that the signatory uses to sign. The definition turns on purpose. It says nothing about how the data is produced, so a typed name, a ticked box or a cryptographic signature can each qualify.

The articles and annexes of eIDAS do not use the term "digital signature" at all. They speak of electronic signatures, at three levels, without naming a technology. The table shows where the two terms part.

Digital signatureElectronic signature
What it isA cryptographic techniqueA legal category defined in eIDAS
What it showsWhich key signed the data, with proof that the data is unchangedThat a person used the data to sign
Who creates itA person, an organisation or a machineA natural person, called the signatory
One without the otherA signed software updateA name typed under an email

The two overlap whenever a person uses a key pair to sign a document. When an organisation does the same in its own name, eIDAS calls the result an electronic seal, which Article 3(25) describes as data that ensures the origin and integrity of the data it is attached to.

Which electronic signatures are built on digital signatures?

Advanced and qualified electronic signatures are, in practice, built on digital signatures. Simple electronic signatures usually are not, because the signer applies no key of their own.

The link shows in the four requirements that Article 26 of eIDAS sets for an advanced electronic signature. It must be uniquely linked to the signatory. It must be capable of identifying the signatory. It must be created using signature creation data that the signatory can, with a high level of confidence, use under their sole control. It must be linked to the signed data in such a way that any subsequent change is detectable. The regulation names no technology. In practice the signature creation data is a private key, the detectable link to the document is the hash, and the technical standards that support the regulation are written around key pairs and certificates.

A qualified electronic signature adds two things, both set out in Article 3(12). It must be created by a qualified electronic signature creation device, and it must be based on a qualified certificate. Both concern the keys. Annex II requires the device to keep the signature creation data confidential and to make sure that it cannot, with reasonable assurance, be derived. Annex I requires the certificate to contain the signatory's name or a pseudonym, together with the validation data that corresponds to the creation data, which in practice is the public key. Only a qualified trust service provider can issue such a certificate, and under Article 24(1) it must verify the person's identity before it does.

The mathematics in a qualified signature can therefore be identical to the mathematics in a signature made with a key someone generated at home. What differs is everything around the keys: who checked the signer's identity, where the private key is kept, who supervises the provider.

What does a digital signature not prove on its own?

On its own, a digital signature does not prove who signed. It proves that a particular private key was used. Whether that key belongs to a named person is a separate question, and the mathematics cannot answer it.

Anyone can generate a key pair in seconds and attach any name to it. A document signed with such a key verifies perfectly. The answer to this problem is the certificate: a statement, itself digitally signed by a third party, that a given public key belongs to a given person. eIDAS defines it in those terms. Under Article 3(14), a certificate for electronic signature is an electronic attestation that links signature validation data to a natural person and confirms at least that person's name or pseudonym. A certificate is worth exactly as much as the care its issuer took in checking the person.

A digital signature also does not prove that the key holder was the one who used the key. If a private key sits in a file on a shared computer, anyone with access to that computer can sign. This is why the rules for qualified signatures put so much weight on the device that holds the key.

Nor does it prove when the signing happened. Unless a time stamp from an independent service is added, the time recorded in a signature is whatever the signer's own computer reported. A valid signature also says nothing about whether the content is true, or whether the signer read it.

Does a digital signature have legal effect in the EU?

Not as such. EU law gives legal effect to electronic signatures, and a digital signature takes its legal standing from the level of electronic signature it amounts to.

Article 25(1) of eIDAS says an electronic signature must not be denied legal effect or admissibility as evidence solely because it is electronic or because it is not qualified. A court cannot therefore turn away a digital signature that a person used to sign merely because of its form. Article 25(2) gives a qualified electronic signature the equivalent legal effect of a handwritten signature, and Article 24a(1) requires every member state to recognise a qualified signature based on a qualified certificate issued in another.

Between those two points, the weight of a signature is a matter of proof. A digital signature backed by a certificate from an issuer that verified the signer is strong evidence of origin. One made with a self-issued key shows little beyond the fact that the document has not changed. Where national law requires a contract to take a particular form, Article 2(3) leaves that requirement in place.

When a counterparty says a document has been "digitally signed", three questions settle what that is worth. Whose certificate is it? Who issued it? Which level of electronic signature under eIDAS does it reach?

How long can a digital signature be verified?

A digital signature can be verified for as long as the verifier can still trust the certificate behind it and the algorithms used to make it. Both have a limited life. Certificates expire or are revoked, and under Article 28(4) of eIDAS a revoked qualified certificate loses its validity from the moment of revocation. Algorithms and key lengths that are safe today are retired as computing power grows.

The usual remedy is to collect the evidence while it is still available. A time stamp shows that the signature existed while the certificate was valid, and the certificate's status at that moment is stored alongside it. The signature formats standardised by ETSI, such as PAdES for PDF documents, have defined places for this material. A signature prepared in this way can be checked years after the certificate itself has expired.

Related questions

Is a scanned handwritten signature a digital signature?

No. A picture of a handwritten signature pasted into a document involves no keys and no hash, so nothing ties it to the document or reveals a later change. If the person used it to sign, it can count as an electronic signature within the meaning of Article 3(10) of eIDAS, at the simple level. Anyone holding the image can paste it somewhere else.

Is a digital signature the same as a digital certificate?

No. A digital signature is made afresh for each document, using the private key. A digital certificate is the credential that states whose public key it is, issued by a third party for a fixed period. One certificate supports many signatures, and a verifier needs both: the signature to check the document, the certificate to learn whose key signed it.

Can a digital signature be forged?

Not in practice without the private key, as long as the algorithm and key length are still considered secure. The realistic risks lie elsewhere. A private key can be stolen or misused if it is poorly protected, and a certificate can be issued to the wrong person if the issuer's identity check is weak. Both are failures of process, not of mathematics.

References

  1. Regulation (EU) No 910/2014 on electronic identification and trust services for electronic transactions in the internal market (eIDAS), Articles 2(3), 3(9), 3(10), 3(12), 3(14), 3(15), 3(25), 24(1), 25, 26 and 28(4), Annexes I and II. European Union, consolidated version of 20 May 2024. eur-lex.europa.eu/eli/reg/2014/910/oj

  2. Regulation (EU) 2024/1183 amending Regulation (EU) No 910/2014 as regards establishing the European Digital Identity Framework, which inserted Article 24a on the recognition of qualified trust services. European Union, 2024. eur-lex.europa.eu/eli/reg/2024/1183/oj

  3. RFC 5280, Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. Internet Engineering Task Force, 2008. rfc-editor.org/rfc/rfc5280

This article explains the technique in general and describes how EU law, the eIDAS Regulation, treats signatures that use it. It covers EU rules only and is not legal advice.

All glossary terms