Discussion:
GnuPG. Unable to decrypt my own message.
(too old to reply)
John Kennerson
2015-05-06 09:40:02 UTC
Permalink
gpg2 -u 0xmyid --hidden-recipient 0xmyid -r 0xmyfriend -e -a
Where is:
gpg2 - gpg (GnuPG) 2.1.2, libgcrypt 1.6.3
0xmyid - my pub dsa3072 key ID.

gpg2 file.asc
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key

Why this may happen?

--
David E. Ross
2015-05-06 15:35:19 UTC
Permalink
Post by John Kennerson
gpg2 -u 0xmyid --hidden-recipient 0xmyid -r 0xmyfriend -e -a
gpg2 - gpg (GnuPG) 2.1.2, libgcrypt 1.6.3
0xmyid - my pub dsa3072 key ID.
gpg2 file.asc
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
Why this may happen?
When you encrypted the message, did you include encrypting to your own
key?
--
David E. Ross

Why do we tolerate political leaders who
spend more time belittling hungry children
than they do trying to fix the problem of
hunger? <http://mazon.org/>
Guy
2015-05-06 15:38:31 UTC
Permalink
Post by John Kennerson
gpg2 -u 0xmyid --hidden-recipient 0xmyid -r 0xmyfriend -e -a
gpg2 - gpg (GnuPG) 2.1.2, libgcrypt 1.6.3
0xmyid - my pub dsa3072 key ID.
gpg2 file.asc
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
Why this may happen?
gpg2 --try-all-secrets file.asc
Anonymous
2015-05-07 23:31:47 UTC
Permalink
Post by Guy
Post by John Kennerson
gpg2 -u 0xmyid --hidden-recipient 0xmyid -r 0xmyfriend -e -a
gpg2 - gpg (GnuPG) 2.1.2, libgcrypt 1.6.3
0xmyid - my pub dsa3072 key ID.
gpg2 file.asc
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
Why this may happen?
gpg2 --try-all-secrets file.asc
gpg: encrypted with 1024-bit ELG key, ID xxxxxxxx, created xxxx-xx-xx
"xxxxxx"
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
--
Guy
2015-05-08 02:46:11 UTC
Permalink
Post by Anonymous
Post by Guy
Post by John Kennerson
gpg2 -u 0xmyid --hidden-recipient 0xmyid -r 0xmyfriend -e -a
gpg2 - gpg (GnuPG) 2.1.2, libgcrypt 1.6.3
0xmyid - my pub dsa3072 key ID.
gpg2 file.asc
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
Why this may happen?
gpg2 --try-all-secrets file.asc
gpg: encrypted with 1024-bit ELG key, ID xxxxxxxx, created xxxx-xx-xx
"xxxxxx"
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
** gpg --decrypt --try-all-secrets file.asc **



$ gpg --hidden-recipient myid -ear myfriend file

$ gpg -d --try-all-secrets file.asc
gpg: anonymous recipient; trying secret key 0xDEADBEEF ...
gpg: anonymous recipient; trying secret key 0xABADCAFE ...
gpg: anonymous recipient; trying secret key 0x0DEFACED ...
gpg: anonymous recipient; trying secret key BAADF00D ...
gpg: anonymous recipient; trying secret key 0xBADDCAFE ...

You need a passphrase to unlock the secret key for
user: "0xBADDCAFE"
1024-bit RSA key, ID 0xBADDCAFE, created 1970-01-01

gpg: anonymous recipient; trying secret key 0xBBADBEEF ...

You need a passphrase to unlock the secret key for
user: "0xBBADBEEF"
1024-bit RSA key, ID 0xBBADBEEF, created 1970-01-01

gpg: anonymous recipient; trying secret key 0xBEEFCACE ...

You need a passphrase to unlock the secret key for
user: "BEEFCACE"
1024-bit RSA key, ID 0xBEEFCACE, created 1970-01-01

gpg: anonymous recipient; trying secret key 0xCAFEBABE ...
gpg: anonymous recipient; trying secret key 0xCAFED00D ...
gpg: okay, we are the anonymous recipient.
gpg: encrypted with 1024-bit RSA key, ID 0xCAFEFEED, created 2015-05-08
"myfriend"
gpg: encrypted with RSA key, ID 0x00000000
foo

$
Fritz Wuehler
2015-05-18 14:53:04 UTC
Permalink
Post by Guy
Post by Anonymous
Post by Guy
Post by John Kennerson
gpg2 -u 0xmyid --hidden-recipient 0xmyid -r 0xmyfriend -e -a
gpg2 - gpg (GnuPG) 2.1.2, libgcrypt 1.6.3
0xmyid - my pub dsa3072 key ID.
gpg2 file.asc
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
Why this may happen?
gpg2 --try-all-secrets file.asc
gpg: encrypted with 1024-bit ELG key, ID xxxxxxxx, created xxxx-xx-xx
"xxxxxx"
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
** gpg --decrypt --try-all-secrets file.asc **
$ gpg --hidden-recipient myid -ear myfriend file
$ gpg -d --try-all-secrets file.asc
gpg: anonymous recipient; trying secret key 0xDEADBEEF ...
gpg: anonymous recipient; trying secret key 0xABADCAFE ...
gpg: anonymous recipient; trying secret key 0x0DEFACED ...
gpg: anonymous recipient; trying secret key BAADF00D ...
gpg: anonymous recipient; trying secret key 0xBADDCAFE ...
You need a passphrase to unlock the secret key for
user: "0xBADDCAFE"
1024-bit RSA key, ID 0xBADDCAFE, created 1970-01-01
gpg: anonymous recipient; trying secret key 0xBBADBEEF ...
You need a passphrase to unlock the secret key for
user: "0xBBADBEEF"
1024-bit RSA key, ID 0xBBADBEEF, created 1970-01-01
gpg: anonymous recipient; trying secret key 0xBEEFCACE ...
You need a passphrase to unlock the secret key for
user: "BEEFCACE"
1024-bit RSA key, ID 0xBEEFCACE, created 1970-01-01
gpg: anonymous recipient; trying secret key 0xCAFEBABE ...
gpg: anonymous recipient; trying secret key 0xCAFED00D ...
gpg: okay, we are the anonymous recipient.
gpg: encrypted with 1024-bit RSA key, ID 0xCAFEFEED, created 2015-05-08
"myfriend"
gpg: encrypted with RSA key, ID 0x00000000
foo
gpg2 -u 0xmyID --hidden-recipient 0xmyID -r 0xfriendID -e -a -o file.txt.asc file.txt

gpg -d --try-all-secrets file.txt.asc
gpg: encrypted with 1024-bit ELG key, ID friendID, created 2014-08-11
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key

--
Arthur T.
2015-05-18 21:50:40 UTC
Permalink
In
Post by Fritz Wuehler
gpg2 -u 0xmyID --hidden-recipient 0xmyID -r 0xfriendID -e -a -o file.txt.asc file.txt
gpg -d --try-all-secrets file.txt.asc
gpg: encrypted with 1024-bit ELG key, ID friendID, created 2014-08-11
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
The man page for gpg doesn't show any support for
hidden-recipient, though the man page for gpg2 does. Have you tried
decrypting using gpg2?
--
Arthur T. - ar23hur "at" pobox "dot" com
Anonymous
2015-05-19 19:47:23 UTC
Permalink
Post by Arthur T.
Post by Fritz Wuehler
gpg2 -u 0xmyID --hidden-recipient 0xmyID -r 0xfriendID -e -a -o file.txt.asc file.txt
gpg -d --try-all-secrets file.txt.asc
gpg: encrypted with 1024-bit ELG key, ID friendID, created 2014-08-11
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
The man page for gpg doesn't show any support for
hidden-recipient, though the man page for gpg2 does. Have you tried
decrypting using gpg2?
There is symlink to gpg2.

ls -l /usr/bin/gpg
/usr/bin/gpg -> gpg2*
--
Anonymous
2015-06-14 01:11:13 UTC
Permalink
Post by Anonymous
Post by Arthur T.
Post by Fritz Wuehler
gpg2 -u 0xmyID --hidden-recipient 0xmyID -r 0xfriendID -e -a -o file.txt.asc file.txt
gpg -d --try-all-secrets file.txt.asc
gpg: encrypted with 1024-bit ELG key, ID friendID, created 2014-08-11
gpg: encrypted with ELG key, ID 00000000
gpg: encrypted with ELG key, ID 00000000
gpg: decryption failed: No secret key
The man page for gpg doesn't show any support for
hidden-recipient, though the man page for gpg2 does. Have you tried
decrypting using gpg2?
There is symlink to gpg2.
ls -l /usr/bin/gpg
/usr/bin/gpg -> gpg2*
Something wrong with gpg (GnuPG) 2.1.4. With gpg (GnuPG) 2.0.27 I got
desired behaviour.
--

Loading...