The answer depends on how exactly you plan to digitally sign your document.
The whole thing will get digitally signed by some encryption algorithm.
Signing things in a void is generally not very useful.
Sure, you could create your own key pair and certificate authority and then sign the document with a signature derived from that, and maybe even put the public key on your website, person-mc-persington.com. But that doesn't stop someone else from doing exactly the same thing, and claiming that they are the real you, and that their signed document is legitimate while yours is a counterfeit, and that their website person-mc-persington.name is the actual real website. You see where this goes.
So, digital signing is usually done within the context of some PKI, or other structure where some authority has the role of verifying that people are indeed who they say they are, and only their private keys are signed such that the resulting document signatures indeed certify that the documents are signed by them. So, the answer to the stated question depends on what kind of document is being signed, and who is the recipient.
For example, if you are signing a legal document within the legal structure of the country of Spain, you will almost certainly want to use a certificate issued by that country's government. Usually, they will also provide you with a hardware card that will store the certificate and private keys, a USB card reader, as well as software that allows using the card/reader and signing the documents. If you're lucky, they will also provide a Linux version of the software, usually either in a .deb
package file or a tarball.
For ad-hoc signing, there are services like DocuSign. These signatures don't certify much - only that a user with certain credentials clicked a button to sign a document. I believe there may be services which perform actual identity checks for the signers and thus provide a higher level of confidence in their signatures.
Some PDF signing software will allow you to apply a visible signature along with a digital signature at the time of signing. This is not the same as simply doodling on the PDF - the crucial difference is that such a visible digital signature will not invalidate any prior digital signatures, as a simple edit would.
Finally, there are decentralized "web-of-trust" structures, as used by PGP. However, unless the counter party is aware of and is already using such a signing scheme, it is unlikely to find much acceptance.
pdftk
, PDF ToolKit might help. Readman pdftk
– waltinator Mar 11 '21 at 16:30