3

Suppose I have to sign a PDF form. If I'm using (say) Acrobat Reader and a hardware security token, at some point I will be prompted for a PIN to authorize the token to sign the document.

How can I be sure that the document which is being sent for signature to the token is the same document that is being displayed to me?

If my copy of Reader, or some part of the communication channel between Reader and the token is compromised, it seems to me that I might end up signing anything at all.

It seems to me that for not to be spoofed in this way I need a whole system, including the OS and the document display client to be trustable. A general purpose computer will not do.

I would appreciate any pointers towards actually existing devices or research towards solving this problem

2

In general, you (or anybody else with your public key) can verify a signature on another machine, which is generally good enough to ensure that the data being signed wasn't tampered with. You could also try calling the signing code directly, passing a byte buffer that you control, and making sure that it verifies the way you'd expect.

I don't know exactly how PDFs store digital signatures, so I'm not sure how you'd go about creating or verifying one manually (without using the software that you don't trust). However, there are definitely multiple PDF programs, so maybe you can use them to get some degree of additional trust.

With all that said, exploiting something like this would be very difficult. An attacker would need:

  • A document (or possibly other data blob) that they want you to sign.
  • A way to get this data onto your computer, and compromise your signing tool so it gets substituted for the data you meant to sign.
  • A document that you will (attempt to) sign, but that will accept the invalid signature.
  • A way to get the spoofed signature back from you so they can add it to the maliciously-chosen data.

This is all possible, but it's not generally going to be a significant threat. If you want to be sure, verifying the signatures on your data, using a different computer and ideally a different program.

2

In addition to @CBHacking's good answer, I'd like to point out that you are theoretically correct when saying "If my copy of Reader, or some part of the communication channel between Reader and the token is compromised, it seems to me that I might end up signing anything at all". If the machine you're using is backdoored or compromised in any other way, then all your security is compromised, and even strong encryption or signature won't hold their purpose.

For this reason it is important to use open source, audited, well-known software as much as possible, and in general have a good knowledge of what runs on your machine. You cannot have perfect security, but for the majority of people that are not excessively paranoid that'll work fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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