Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrypt: propose only keys really used for encryption #23

Open
doegox opened this issue Nov 13, 2009 · 0 comments
Open

Decrypt: propose only keys really used for encryption #23

doegox opened this issue Nov 13, 2009 · 0 comments

Comments

@doegox
Copy link
Collaborator

doegox commented Nov 13, 2009

When decrypting, we get a key selection dialog box with all private keys and we've to guess which private key was used to select the right one.
Better to have the plugin to pre-screen the encrypted message and:

  • if one private key correspond to one of the public keys used for encryption, tell which one is selected and ask for corresponding passphrase (or reuse current dialog with only one key but then remove the "select a private key" message)
  • if several private keys correspond to the public keys used for encryption, propose them in a similar was as the current dialog box
  • if none of the keys is usable and if all keys used for encryption are known, then tell the user he cannot decrypt the message, maybe with a list of the other keys for information
  • if none of the keys seems usable and at least one key for encryption is hidden (see --hidden-recipient), then warn user and propose the current dialog box to select one of the available private keys.

Examples how to use gnupg to know who are the recipients for encrypted blob:

Two recipients:
gpg --list-packets --list-only test.asc|grep pubkey
:pubkey enc packet: version 3, algo 1, keyid E84D83867877464A
:pubkey enc packet: version 3, algo 1, keyid 0493D562504EA351

Two hidden recipients:
gpg --list-packets --list-only test2.asc|grep pubkey
:pubkey enc packet: version 3, algo 1, keyid 0000000000000000
:pubkey enc packet: version 3, algo 1, keyid 0000000000000000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant