document from the signed document, the recipient should run the following command:
# gpg --output file.txt --decrypt file.txt.sign.asc
This will extract the signed file in the output file file.txt.
How to clearsign a document?
Sometimes, it is not desirable to compress the document while signing it. For that purpose, we use the option –clearsign (What is clearsign ?).
# gpg --armor --output sign.asc --clear-sign file.txt
Verifying the clearsigned document is the same as verifying the binary signed document.
How to make a detached signature?
Sometimes it is not desirable to output the signed document in the same original document. We use a detached signature for that purpose. We use the option –detach-sig for that purpose.
# gpg --armor --output sign.asc file.txt
This will create a separate file sign.asc, which will contain the signature.
To verify the signature, the recipient should run the following command:
# gpg --verify sign.asc file.txt
It will output whether the signature is valid.
I hope this helps. However, readers who want to know more about how different cryptographic algorithms and Public Key Infrastructure work can refer to the book “Cryptography And Public Key Infrastructure.”






0 Comments