Re: determine encryption key without trying to decrypt
Hi, Quoting Hauke Laging : how can I determine the key(s) for which a file has been encrypted without gpg trying to decrypt the file? I don't understand why --list-packets tries to decrypt it anyway. --batch and --no-tty do not solve the problem. Because of the --hidden-recipient (or --hidden-encrypt-to name) functionality, you're sort-of obliged to simply throw whatever secret keys you have at it and hopefully be able to decrypt it. Why don't you use the option from the faq [1], is there something wrong with: gpg --batch --decrypt --list-only --status-fd 1 2>/dev/null | \ awk '/^\[GNUPG:\] ENC_TO / { print $3 }' Ciao, kwadronaut [1] http://www.gnupg.org/faq/GnuPG-FAQ.html#how-can-i-get-list-of-key-ids-used-to-encrypt-a-message ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: determine encryption key without trying to decrypt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 05/02/2013 11:41 PM, Hauke Laging wrote: > Hello, > > how can I determine the key(s) for which a file has been encrypted > without gpg trying to decrypt the file? Hi Hauke, Try --list-only - -- - Kristian Fiskerstrand Twitter: @krifisk - Public PGP key 0xE3EDFAE3 at hkp://pool.sks-keyservers.net fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3 - Docendo discimus We learn by teaching -BEGIN PGP SIGNATURE- Version: GnuPG v2.1.0-beta210 (GNU/Linux) iQIcBAEBCAAGBQJRgt68AAoJEAt/i2Dj7frjMS4P/3tzsHIeiydHEaEATJd8Lxqf e4xvhSfoSUscAA4ak4nt3Ld6lfzXJiBYmKgRrHBM6/KUsFJM1e/gR1HEfvqiPcIK DTw5WuLv5lmuZwxqBCh/AYOUDkrS2WADnQsKIlpDqF6YYjqxf0Vuho5YrYGe7p7/ ItR9AqxybGKRr5LVbqz8A4se0rYSU9Ok2AWU8VGd9ZIIjYrlwLYju1XUyTcBK3s+ Q/wkaYuMCm4Lx76Ui8dfsB6JL96O8CZB5S2MKeJ8bo++DmarnZEwsoLRriFNeaZy 5LelVm9ENBkZkZBjhR76KngWnUzyqoyVXzZma5+Fjz6qhYyWocJgTTcXHd680cJL F+fm4PnOXNIZqP83uNfAW+JozlD5RjLw7W2B7kWRLeZUgWiHfwCWMP7GbkAk0nda L0sK/oNq3hBgiFod4BYd06LxJMYxS9bjpp+XfP+7zbsEw/MW6OQyhrK2eN3Vk9W5 Vhy3tpgYAIh1qrkuxq3I0ZPFodOPRZoULLQxbV/rzwre2pb/5d+wBGRL2Js6ibVT 1FtjPkhyxJug2yLRFGvWRnj9J/3V+ac9IoB6GYxNFVyKx+BfDLzxlxkCNh/8VVB7 QTCaJ44svF6QFFmxi8G9jDTB/W6xvrvkfQJoh7f40UQX1HC56LBB4xqN3bhJ48bL yGGTzww3hGj3VGPu6Ybk =zTCy -END PGP SIGNATURE- ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: determine encryption key without trying to decrypt
Am Do 02.05.2013, 23:46:41 schrieb Kristian Fiskerstrand: > > how can I determine the key(s) for which a file has been encrypted > > without gpg trying to decrypt the file? > Try --list-only Yeah, that's it. Still dark corners in man gpg I am unfamiliar with... And what a response time, serverfault-like. :-) Hauke -- ☺ PGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5 (seit 2012-11-04) http://www.openpgp-courses.org/ signature.asc Description: This is a digitally signed message part. ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users
determine encryption key without trying to decrypt
Hello, how can I determine the key(s) for which a file has been encrypted without gpg trying to decrypt the file? I don't understand why --list-packets tries to decrypt it anyway. --batch and --no-tty do not solve the problem. I don't consider my two ideas very elegant: 1) Call "gpg --status-fd $whatever --list-packets file.gpg", get the info from --status-fd and kill gpg 2) Start another gpg-agent, this one with --batch, and let gpg connect to this instance. I cannot imagine that this cannot be done with the gpg call alone so I hope I just don't see the good solution. Hauke -- ☺ PGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5 (seit 2012-11-04) http://www.openpgp-courses.org/ signature.asc Description: This is a digitally signed message part. ___ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users