Hey guys, Having a little gpg issue I was wondering if someone could help me with. A friend of mine sent me an encrypted message. So I searched online and found a a set of keys that correspond with his email address. And imported them. But when I go to decrypt the message, this is what I get: [root at ops:~] #gpg --decrypt roger-message gpg: encrypted with 2048-bit RSA key, ID 9617EA5C, created 2014-10-01 "Roger Sherman <rsherman at viddler.com>" *gpg: encrypted with RSA key, ID 9A41C766* *gpg: decryption failed: secret key not available* Here's a listing of keys that shows his key imported: [root at ops:~] #gpg --list-keys /root/.gnupg/pubring.gpg ------------------------ pub 1024D/F186197B 2010-11-30 uid Tim Dunphy <bluethundr at gmail.com> sub 2048g/B712B288 2010-11-30 Tim Dunphy <bluethundr at gmail.com> *pub 2048R/9E0AD649 2014-10-01 [expires: 2016-10-01]* *uid Roger Sherman <rsherman at viddler.com <rsherman at viddler.com>>* *sub 2048R/9617EA5C 2014-10-01 [expires: 2016-10-01]* So maybe I just didn't import the right key? Or do you think the message wasn't sent correctly? Who's the dummy here? Me or him? :) Thanks Tim -- GPG me!! gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
> Hey guys, > > > Having a little gpg issue I was wondering if someone could help me with. > > A friend of mine sent me an encrypted message. So I searched online and > found a a set of keys that correspond with his email address. And imported > them. But when I go to decrypt the message, this is what I get: > > [root at ops:~] #gpg --decrypt roger-message > gpg: encrypted with 2048-bit RSA key, ID 9617EA5C, created 2014-10-01 > "Roger Sherman <rsherman at viddler.com>" > *gpg: encrypted with RSA key, ID 9A41C766* > *gpg: decryption failed: secret key not available* > > > Here's a listing of keys that shows his key imported: > > [root at ops:~] #gpg --list-keys > /root/.gnupg/pubring.gpg > ------------------------ > pub 1024D/F186197B 2010-11-30 > uid Tim Dunphy <bluethundr at gmail.com> > sub 2048g/B712B288 2010-11-30 > Tim Dunphy <bluethundr at gmail.com> > > *pub 2048R/9E0AD649 2014-10-01 [expires: 2016-10-01]* > *uid Roger Sherman <rsherman at viddler.com > <rsherman at viddler.com>>* > *sub 2048R/9617EA5C 2014-10-01 [expires: 2016-10-01]* > > So maybe I just didn't import the right key? Or do you think the message > wasn't sent correctly? Who's the dummy here? Me or him? :) > > Thanks > Tim > > -- > GPG me!! > > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B >I haven't messed with gpg for a while but it seems to me that the message was encrypted with the worng key. In other words for you (Tim) to be able to decrypt the message uaing your private key Roger should have encrypted it with your public key. You should not have had to import Rogers keys. However if had needed to verify Rogers signature you would need his public key(s).
On 10/01/2014 04:58 PM, Tim Dunphy wrote:> Hey guys, > > > Having a little gpg issue I was wondering if someone could help me with. > > A friend of mine sent me an encrypted message. So I searched online and > found a a set of keys that correspond with his email address. And imported > them. But when I go to decrypt the message, this is what I get: > > [root at ops:~] #gpg --decrypt roger-message > gpg: encrypted with 2048-bit RSA key, ID 9617EA5C, created 2014-10-01 > "Roger Sherman <rsherman at viddler.com>" > *gpg: encrypted with RSA key, ID 9A41C766* > *gpg: decryption failed: secret key not available* ><snip>> So maybe I just didn't import the right key? Or do you think the message > wasn't sent correctly? Who's the dummy here? Me or him? :)looks like he encrypted with HIS public key. So you need his private key to decrypt, obviously you don't have that. I believe it's the other way around: he should encrpyt with your public key, then you are the only person capable of decrypting (with your private key).
> *gpg: encrypted with RSA key, ID 9A41C766* > *gpg: decryption failed: secret key not available*You may have the other parties public key, but it seems that the party sending you messages used the wrong public key for you to encrypt the message, key ID 9A41C766 does not correspond to your private key. Maybe they intended to send the message to someone else or maybe that corresponds to and old version of your key that they had on their keyring? ? Mark Tinberg, System Administrator Division of Information Technology - Network Services University of Wisconsin - Madison mark.tinberg at wisc.edu