I'm trying to decrypt a message using my personal secret key.
When I try to decrypt the message (using
gpg --decrypt message.txt), I get the following error:
gpg: encrypted with RSA key, ID 3810D17A gpg: decryption failed: No secret key
I believe the reason for this to be the following:
When I run
gpg --list-key i get the following output:
/Users/sahandz/.gnupg/pubring.gpg --------------------------------- pub 2048D/00D026C4 2010-08-19 [expires: 2018-08-19] uid [ultimate] GPGTools Team <email@example.com> uid [ultimate] GPGMail Project Team (Official OpenPGP Key) <firstname.lastname@example.org> uid [ultimate] GPGTools Project Team (Official OpenPGP Key) <email@example.com> uid [ultimate] [jpeg image of size 5871] sub 2048g/DBCBE671 2010-08-19 [expires: 2018-08-19] sub 4096R/0D9E43F5 2014-04-08 [expires: 2024-01-02] pub 2048R/8D596035 2012-09-12 uid [ unknown] Sonja Buchegger (CSC) <firstname.lastname@example.org> sub 2048R/0C6AB020 2012-09-12 pub 2048R/E22ECA45 2015-11-13 [expires: 2016-02-11] uid [ultimate] Sahand Zarrinkoub (DD2395) <email@example.com> uid [ultimate] Sahand Zarrinkoub (DD2395) <firstname.lastname@example.org> sub 2048R/F16B7DCC 2015-11-13 [expires: 2016-02-11] pub 2048R/CA0EC350 2012-09-11 [expires: 2022-09-09] uid [ full ] Computer Security (course key) <email@example.com> sub 2048R/51C9E3E9 2012-09-11 [expires: 2022-09-09]
As you can see there is no secret key listed here.
However, if look in the GUI (GPG keychain, using my macbook) I can indeed see that there is a secret/public key pair that is my personal one.
How can I fix this? I would very much like to keep the key pair I created originally rather than creating a new one.