Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I ran into this problem today, and found your question looking for the answer. I've seen many merry an example of how to <em>encrypt</em> things for multiple recipients... never saying/showing what will happen when one tries to <em>decrypt</em> that data. Here's what I got:</p> <pre><code>user@system ~ $ gpg --decrypt filename.pgp You need a passphrase to unlock the secret key for user: "SOMEBODY ELSE &lt;somebody_else@example.com&gt;" 2048-bit ELG-E key, ID ABC1234, created 1972-10-29 (main key ID ABC5678) gpg: Invalid passphrase; please try again ... [I DON'T HAVE *THEIR* PASSPHRASE!] 2 more times... finally... You need a passphrase to unlock the secret key for user: "HEY! This is ME! &lt;my_email@example.com&gt;" 2048-bit ELG-E key, ID DEF1234, created 1969-02-03 (main key ID DEF5678) gpg: encrypted with 2048-bit ELG-E key, ID ABC1234, created 1972-10-29 "NAME &lt;email@example.com&gt;" gpg: public key decryption failed: bad passphrase gpg: encrypted with 2048-bit ELG-E key, ID DEF1234, created 1969-02-03 "HEY! This is ME! &lt;my_email@example.com&gt;" and then the file decrypted fine... </code></pre> <p><em>Quick Note:</em> Just to clarify, <a href="http://www.pgpi.org/doc/pgpintro/" rel="nofollow">for security reasons</a> one's passphrase and one's <a href="http://en.wikipedia.org/wiki/Public-key_cryptography" rel="nofollow">private key</a> should <strong>NEVER</strong> be given to anyone else. <a href="http://www.gnupg.org/gph/en/manual/c481.html" rel="nofollow">The passphrase is to keep the private key "safe" should it become compromised.</a> One's <em>public</em> key is the only thing that should be shared with others.</p> <p>I preface this with the fact I currently only have access to version 1.4.2.2, and don't have the ability to test these solutions. Later version have certain options that may well be what's needed. <strong><em>Please try and answer back if any of these work.</em></strong></p> <p><code>--local-user/-u</code> looked promising. In the version I have, <code>--help</code> showed <a href="http://www.csc.gatech.edu/~copeland/6612/pgp/gpg_quick_help.txt" rel="nofollow"><code>use this user-id to sign or decrypt</code></a> But when trying it seemed futile, further research revealed a cruel truth: <a href="http://www.gossamer-threads.com/lists/gnupg/users/4848#4848" rel="nofollow">seems the help is wrong</a>, and this is ONLY an option using for <a href="http://gnupg.org/gph/en/manual/x135.html" rel="nofollow">"signing"</a>.</p> <p><a href="http://www.gossamer-threads.com/lists/gnupg/users/51238#51238" rel="nofollow">This post</a> has a likely solution, though I personally find it messy:</p> <pre><code>gpg --try-all-secrets --passphrase &lt;passphrase here&gt; filename.pgp </code></pre> <p><code>--passphrase</code> <a href="http://lists.gnupg.org/pipermail/gnupg-users/2007-August/031711.html" rel="nofollow">was apparently added in version 1.4.3</a>. UGH!</p> <p><strong>EDIT:</strong> <a href="http://www.gnupg.org/documentation/manpage.html" rel="nofollow">Perhaps a better (possibly, below) solution is only available in gpg2? </a> <a href="http://www.gnupg.org/documentation/manuals/gnupg-devel/GPG-Key-related-Options.html#GPG-Key-related-Options" rel="nofollow"><code>gpg2 seems to have</code></a> <code>--try-secret-key</code>, which if I read correctly, may be what we're both looking for?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload