Detaching signature from signed object

Matthew Richardson matthew-l at itconsult.co.uk
Sun Jun 20 18:52:53 CEST 2021


Is there any way in GnuPG to detach (or extract) a signature from a signed
object?  For example, a signed object is created with:-

>gpg --armor --output signedfile.asc --sign inputfile.txt

where what is wanted is a detached signature which would verify against
inputfile.txt.

This feature is in PGP 2:-

>pgp -sa inputfile.txt -o signedfile.asc
>pgp -b signedfile.asc -o verified.txt

which also produces verified.pgp as the detached signature.  The feature is
described (briefly) in the PGP 2 documentation thus:-

>To detach a signature certificate from a signed message:
>     pgp -b ciphertextfile

The reason for asking is that I operate a service [1], which currently used
PGP 2, and which would benefit from more recent crypto, but which also uses
"pgp -b" extensively.

Best wishes,
Matthew

[1] http://www.itconsult.co.uk/stamper.htm



More information about the Gnupg-users mailing list