[Cialug] dumb gpg question

Nathan C. Smith smith at ipmvs.com
Thu Jul 21 15:18:28 CDT 2005


I thought it was a one-way encryption.

-----Original Message-----
From: Barry Von Ahsen [mailto:barry at vonahsen.com] 
Sent: Thursday, July 21, 2005 3:18 PM
To: Central Iowa Linux Group
Subject: [Cialug] dumb gpg question



If I am encrypting data using someone else's public key, can I decrypt 
the file with that same key?

the command used is:
echo $data | gpg --armor --always-trust --batch --no-secmem-warning 
--homedir '.$gnupghome .' --decrypt -u "' .$user .'" --recipient "' 
.$recp .'"' >> $file

the original data is gone, and I just have a file with ascii-armored 
gpg'd data

I am su'd to $user, $recp's pub key is in my keyring (from --list-keys) 
and gpg --decrypt $file returns:
gpg: encrypted with 1024-bit ELG-E key, ID ########
gpg: decryption failed: secret key not available

-barry

_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list