Consider if a file is encrypted using command
e.g.
gpg --output test.txt.gpg --encrypt --recipient test@example.com test.txt
Now, consider another person received test.txt.gpg
the the pub key test@example.com
, how to perform a check to make sure the file is really encrypted using the pub key?
Best Answer
Some behavior has changed in newer versions of
gpg
(I'm testing ongpg v2.2.4
). It prompts you for the passphrase when doing--list-packets
. And now by default,-k
doesn't show the key IDs anymore, only the 40-char fingerprints.Here are some commands that will skip prompts and show the key IDs:
You can then match the 16-character key ID from
--list-packets
to list from-k
.