I want to ask you one question about digital signatures as they are (for example) used when digitally signing PDFs.

We know that if our document has a digital signature, we can detect if the original document has been altered or not. And if we want to prove owner identity, we use digital signatures.

On the other hand, it's very simple to remove a certificate from the document, and change it (because the document itself will not be altered, due to the certificate not being in the byte range of which the hash is encrypted as a digital signature).

So, what security do digital signatures provide (to - for example - PDFs)? Or am I missing something?


1 Answer 1


You've stumbled on the requirement for authentication.

Recall that signature schemes have a private key and a public key. The private key is used to sign the document in question, and the public key is given to the verifying party so that they can verify that the signature is correct.

You're correct that it is possible to strip a digital signature and replace it with a fake one from, say, a different key. To defeat this, the verifying party needs to check that it has the correct public key to verify the signature. For example, the signer might coordinate with the verifying party a week ahead of time, in real life, and exchange keys physically (here, you could use some form of ID as authentication, since IDs include pictures). Or they might take the SSL route and use third-party certificate authorities. At any rate, they need some way to obtain the correct public key.

Then, if a man-in-the-middle attacker has replaced the signature with a fake one from the wrong key, when the verifying party attempts to verify the signature against their known-good public key, the verification will fail. The point here is that only the (proper) signing party knows the private key associated with the known-good public key, so only the signing party can generate an authenticate signature that will match that public key.

Thus, simply checking that a digital signature is present is not enough; one needs to computationally verify that the signature is correct using an authenticated public key, i.e. one that the verifying party knows for sure is "owned" by the alleged signer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.