Sorry if this is more of a conceptual question. I was using GPG to send encrypted emails back and forth with a friend and I understand why I am able to decrypt the messages my friend sends me: because that data was encrypted using my gpg public key and I have the corresponding private key.
But for fun, once I encrypted some data using my friend's public gpg key, I highlighted it and chose "OpenPGP: Decrypt Selected" and it worked. I don't have my friend's private key anywhere in my GPG Keychain. So I don't understand this because I thought that only the corresponding private key is able to decrypt the ciphertext.
It seems that possibly both public keys are used when encrypting data (i.e. in an email)?? It's not like the sender doesn't know what data they encrypt and send but wouldn't this mean that now there are two private that can decrypt the data vs just the one?
I've been reading through their manual but I only see explanations on the different types of cryptosystems, nothing explicitly stating how GPG works and what it is using.