PGP encrypt/GnuPG decrypt problem

Bill Crane bcrane at netcentrix.net
Tue Nov 23 15:51:17 CET 2004


I'm a novice and I've struggled with this problem for a few days.  I've 
searched the FAQs and other information sources looking for information 
regarding the problem that I'm having.  While I've found some information 
in the GnuPG FAQ from question 5.9, I'm still stuck.

Quick Synopsis.

I've create a new key pair using GnuPG, and I've exported the new public 
key and imported it into PGP.  I've then encrypted a file using the newly 
imported public key and transferred the encrypted file back to my linux 
server, and when I try to decrypt it I get the following message:

   gpg: encrypted with ELG-E key, ID 26B23A2E
   gpg: decryption failed: secret key not available

For what it's worth, the key ID listed above (26B23A2E) does not appear 
(not that I can find) on any key in my PGP keyring.

Here are specifics:

GPG info
   # gpg --version
   gpg (GnuPG) 1.2.1
   Copyright (C) 2002 Free Software Foundation, Inc.
   This program comes with ABSOLUTELY NO WARRANTY.
   This is free software, and you are welcome to redistribute it
   under certain conditions. See the file COPYING for details.

   Home: ~/.gnupg
   Supported algorithms:
   Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA, ELG
   Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
   Hash: MD5, SHA1, RIPEMD160
   Compress: Uncompressed, ZIP, ZLIB

   Running on RedHat Enterprise server

PGP info
   Version 8.0.3 running on Windows 2000
   License expiration is March 2005

Procedural info

When this key pair was created using GnuPG, I chose
   DSA and ElGamal
   2048 bytes
   no expiration
   passphrase assigned

After the key pair was created, I followed the advice found in question 5.9 
of the FAQ
(http://www.gnupg.org/(en)/documentation/faqs.html#q5.9)
and I ran the following GnuPG commands:

   $ gpg --s2k-cipher-algo cast5 --s2k-digest-algo sha1 --s2k-mode 3 \
     --simple-sk-checksum --edit MyKeyID
   > setpref S9 S8 S7 S3 S2 S10 H2 H3 Z1 Z0
   > updpref
   > passwd (new passphrase given)
   > save

   $ gpg --export MyKeyID > mypublickey.pgp

The exported public key was successfully imported into PGP and appears 
there are on my keyring.

Here is the slightly modified output of a gpg --list-keys command
# gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub  1024D/CC4BD445 2004-11-23 MyKeyID (MyKeyID) <bcrane at netcentrix.net>
sub  2048g/50FA58C8 2004-11-23


When I view the key properties of the imported key within PGP, I see this 
information:
   ID     0xCC4BD455
   Type   DH/DSS
   Size   2048/1024
   Cipher AES-256
   Enabled


 From my novice perspective, everything appears to be in order, and yet 
when I decrypt a file with the public key using PGP and try and decrypt 
using GnuPG, I get:

# gpg --decrypt MyFile.txt.pgp
gpg: encrypted with ELG-E key, ID 26B23A2E
gpg: decryption failed: secret key not available


Is there a step that I have left out which I should have performed?  Thanks 
in advance.











More information about the Gnupg-users mailing list