6 ms·
> Cool. So it seems like PDF signatures are broken by design, not just implementation. If you can just append unsigned content to a signed PDF, you are toast.
by rauhl 8y ago
> Cool. So it seems like PDF signatures are broken by design, not just implementation. If you can just append unsigned content to a signed PDF, you are toast.
I don’t know that I’d say that. Seems like it'd be useful behaviour to be able to make post-signature modifications so long as it’s clear what they are.
As a concrete example, it’s the obvious way to implement a documented contractual negotiation: party A drafts a contract & signs it, then party B makes modifications & signs the bundle of (original contract, signature, modifications), then party A countersigns party B’s modifications & signature, indicating acceptance.
Or maybe I’m missing something?
- arethuza 8y agoI seem to remember that you could amend a signed PDF and add stuff to add a white rectangle over something you want to change (e.g. a pass/fail entry) and then stick in the new text over the rectangle. The original text was there, and hadn't been modified so the signature was still valid, but the superficial appearance of the document was misleading even if it was possible to identify the tampering if you knew what to do (which I suspect 99.9% of people reading PDFs would never bother doing).
- rauhl 8y agoYeah, that would be bad — hence my proviso ‘so long as it’s clear what [the post-signature modifications] are.’ If modifications aren’t clearly called out, then that’s a (bad) bug in the viewer.
- arethuza 8y agoI think that's where certification was supposed to come in (its been 10+ years since I worked with this stuff so my recollection is a bit vague) - you create the main structure of the document and then lock that down with certification and allow people to complete existing fields, including adding signatures.
- IgorPartola 8y agoThe issue isn't the functionality, it's the design of the format. This design will lead to an endless slew of possible attacks. It is just a poor way of doing things. What you want is to sign the whole file. It looks like the design here is a hack using the existing PDF format instead of adding a container to the PDF. If you want multiple parties signing the same document, you should have a container that allows you to append additional signatures to the container. The idea that you need to have a squiggly line inside the PDF to show that it's valid is really dumb in this context anyways. Instead the PDF reader should show you that "@raul signed this document on 2019-03-06 at 11:47:55 EST, here is his GPG signature", and that's it. No squiggly lines needed.
- izacus 8y agoPretty much all you talk about is supported inside PDF though.
- IgorPartola 8y agoBut that’s not the point. You can’t treat the cryptographic signature as both a signature and content. Otherwise you are opening yourself up to all these different attacks.
- matthewrobertso 8y agoA PDF Signature can embed a signature reference which specifies things about what changes to the document are allowed without invalidating the signature. It is possible to make a signature that doesn't allow any changes to the file, or allows changes to annotations, or doesn't allow signature fields to be modified. To learn more google about "DocMDP" and "FieldMDP"