0

I own multiple PGP key pairs and receive a PGP-encrypted email. How does PGP know which key has been used for encryption, i.e., which key should be used for decrypting the email?

1

The key used for encryption is stored in the OpenPGP message's meta data, so your implementation of OpenPGP can just look up the proper key in the message. Unless the "hidden recipient" feature is used by the sender, in which case the application will just try through all available private keys until it finds the matching one (the OpenPGP CFB mode includes mechanics to understand whether the decryption was successful).

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.