A public key was sent to me to decrypt the pgp-encrypted file, as well as the passphrase. I imported the key using:
gpg --import publickey.asc
And checking it with
gpg --list-keys
Now I am trying to decrypt the file. I put the passphrase in a file called pass.txt and ran it on the command line:
gpg -d encryptedfile.txt.pgp --output encryptedfile.txt
But I get:
gpg: encrypted with ELG-E key, ID XXXXXXXXX
gpg: encrypted with 2048-bit RSA key, ID XXXXXXXXX, created 2010-03-10
"XXXXXXXXX XXXXXXXXX (XXXXXXXXX FTP Key) <XXXXXXXXX@XXXXXXXXX.org>"
gpg: decryption failed: secret key not available
If I do gpg -list-secret-keys, itβs not there ... How do I associate a passphrase with an imported key?
source
share