# Is it possible to determine a PGP public key from encrypted data?

Is it possible to find out which public key was used to generate the message?

Scenario is like this :

I got data which is encrypted with a public key. Now a "bad guy" hast the encrypted data, and knows the decrypted content and wants to know who was the receiver of the data. The "bad guy" has all possible public keys which could have been used to encrypt the data.

Is it possible for the "bad guy" to find out who was the receiver(or witch public key was used).

Thanks a lot.

-
Yes, you can try all keys to find the one that matches the ciphertext but that would be impractical depending on how many keys exist. For example you may have recovered 10-20 keys somehow (practical), or you might try to brute-force all possible key combinations (impractical). And no, you cannot find the recepient without extra data such as an email address, message content that gives away personal info etc. –  rath Apr 24 '13 at 17:24
I seem to remember having read (either here or at security.SE) that PGP $\hspace{1.8 in}$ intentionally makes it easy to do that. $\:$ –  Ricky Demer Apr 24 '13 at 17:48
The decrypted content is of no help accomplishing this task. But he can trivially do it because the PGP file contains the ID of the key needed to decrypt it. –  David Schwartz Apr 27 '13 at 8:28

http://security.stackexchange.com/questions/25170/what-information-is-leaked-from-an-openpgp-encrypted-file ${\color{white}{This text is supposed to be white, and will hopefully be enough to keep it here rather than being made into a comment.}}$