I received an file encrypted with the public key I generated but I can't get it to decrypt.
Steps:
gpg --gen-key
default optionsgpg --export -a <email> > pub.key
- sent the pub.key
- received the encrypted file
cat <file> | gpg
The error:
$ cat cred.gpg | gpg
gpg: key 71980D35: secret key without public key - skipped
gpg: encrypted with RSA key, ID 0D54A10A
gpg: decryption failed: secret key not available
However, the secret key DOES exist in my keyring and the public key i generate from it matches the fingerprint of the pub.key i sent to my coworker.
$ gpg --list-secret-keys
/home/jcope/.gnupg/secring.gpg
------------------------------
sec 2048R/71980D35 2016-03-04
uid me <email>
ssb 2048R/0D54A10A 2016-03-04
Checking the fingerprint
$ gpg --with-fingerprint pub.key
pub 2048R/AF0A97C5 2016-03-04 me <email>
Key fingerprint = 17A4 63BF 5A7D D3B2 C10F 15C0 EDD6 4D8A AF0A 97C5
sub 2048R/1103CA7C 2016-03-04
$ gpg --fingerprint | grep 17a4 -i
Key fingerprint = 17A4 63BF 5A7D D3B2 C10F 15C0 EDD6 4D8A AF0A 97C5
I'm a gpg newby and at a loss for why this isn't working. It seems like the most standard operation.