5

I have recently started using pgp and am still in the infancy stages with knowledge. i sent a friend an encrypted message using pgp4usb. a few days later they responded, with relevant info, being able to read and decrypt my message. by this point i actually couldnt remember exactly what id said to them so i wanted to review my orginal message. i took the information putit in to pgp4usb and tried to decrypt. i get an error message saying "no secret key" as this message was mine and was sent from my computer a few days ago, i assumed viewing it would be easy to do. i have since tried playing within pgp writing messages and decrypting using my keys and its been fine, i tried importing my back up private key and it has said that one exists that is identical, so i didnt bother

what can i assume the problem to be? i moved my back up private key from one folder to another but other than this nothings changed

4

I notice that "encrypt to self" is not included until 0.4 of gpg4usb:

New alpha release 0.4

  • added encrypt to self functionality, so that every message additionally is encrypted for the choosen key

Encrypt to self is not usually the default with command line PGP/GPG clients - it's common for command line PGP/GPG systems to not include the sender's key in the encrypt-to list, making it impossible for you to read what you sent.

Note: PGP Command Line, by default, does not encrypt to the default key. If you want to encrypt to yourself, you will need to specify your key as a recipient.

PGP has --encrypt-to-self for this purpose; GPG uses --encrypt-to your_key_ID instead.

2

The reason this doesn't work is that PGP doesn't encrypt a message with your key. Rather, it encrypts it with the recipient's key. It uses RSA, which is an asymmetric algorithm (actually, it encrypts the message with a symmetric cipher and a random key and encrypts the symmetric key with the recipient's public key, but it then throws away its copy of the symmetric key so it amounts to the same thing - the key used to encrypt the message is only available to the recipient). Asymmetric schemes are nice because it makes key exchange very easy - you have to verify that your friend's public key is really his key, but you don't have to keep that key secret (that's why it's a public key). You can't decrypt the message unless you also encrypted it with one of your own public keys, which PGP supports (you can have as many recipients as you want, and any of them can decrypt the message).

Now, PGP (and GPG) can also encrypt a copy of sent messages with your own public key; this doesn't help with old messages, but you can set it to do so by default with new messages in the future. But your own message from two days ago was only encrypted with the recipient's public key, which means only he can decrypt it. If you want a copy of that message, you'll have to ask your friend, who presumably has a copy. If you don't trust them and want to verify that what they send you was really what you sent them, you can ask them to send you the whole decrypted message (and they can encrypt that with your key), including signature, and you can verify that the signature is yours.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.