user11812736
user11812736

Reputation:

gpg: --sign, --clear-sign, --detach-sign

I am making this question because I didn't find a clear explanation about the difference between these 3 gpg options:

gpg --sign file        # produces file.gpg
gpg --clear-sign file  # produces file.asc
gpg --detach-sign file # produces file.sig

file.gpg and file.sig seem to be binary files, while file.asc seems to be a text file. What is the relationship between these 3 files?

Upvotes: 9

Views: 12787

Answers (1)

openoms
openoms

Reputation: 112

Here you go: https://www.gnupg.org/gph/en/manual/x135.html

Basically when signing with --detach-sign the resulting .sig won't contain the signed file only the signature.
--sign compresses, signs and outputs the signed text in a binary format.
--clearsign wraps the text in an ASCII-armored signature

Upvotes: 8

Related Questions