[Cialug] dumb gpg question

Barry Von Ahsen barry at vonahsen.com
Thu Jul 21 15:17:42 CDT 2005


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



More information about the Cialug mailing list