Why is my private key used for me to encrypt a file? Why am I able to decrypt a file I encrypted using someone else's public key?
I'm using GPG tools. My understanding of how GPG works is this. I have a public/private key. The recipient has a public/private key. If I want to send a recipient an encrypted file, I encrypt it using their public key and they decrypt what I sent using their private key. If they want to send me an encrypted file, they encrypt it using my public key, I can then decrypt it using my private key.
- Ex. I want to send an encrypted file to a journalist, I encrypt it using their public key and they are able to decrypt it using their private key. Since I don't know their private key, I should not be able to decrypt it right?
However in reality, when I encrypt this file using the journalist's public key it also asks me "Encrypt with password?" If I do it prompts me to set a password of my own. I'm then able to decrypt the file meant for the journalist with the password I just created. Why is this?
- If I am sending someone a recipient an encrypted file, why do I need a public/private key in the first place (unless for digital signing) as shouldn't I be using their public key and they use their private key, thereby the encryption not using any keys of mine anyway?
Posted Mar 23, 2022, 3:56 AM UTC
72