1
votes

I am looking for help to figure out how to tie a secret key with a passphrase to encrypt a file using GPG. I had tested many option (--encrypt, --sign, --recipient, --symmetric, etc), but in all of them, I was able to decrypt the file typing only the passphrase, even in a machine where I don't have the public nor the private/secret keys.

Is there a way to force the user to have the secret key and to be asked to type the passphrase?

I am open to any other idea that force a double security check to decrypt the protected file.

Thanks,

1
Just to complete, I am using the GnuPG version 2.0.9 over Linux.Emerson
Stack Overflow is about software development. Your question is about general tool usage, and thus is off topic here. It would be a better fit for Stack Overflow's sister site Super User.Jens Erat
I have tried to protect my file using these different syntaxes: ### gpg --encrypt --symmetric --sign file.txt AND gpg --symmetric --sign file.txt AND gpg --symmetric --recipient file.txt AND gpg -sb file.txt AND gpg --default-key AFAEF918 --encrypt file.txt ### In all attempts, the protected file was decrypted typing only the passphrase, even in one computer without the public/private keys. ##### /root/.gnupg/secring.gpg >>> sec 1024D/AFAEF918 2016-02-12 // uid TEST User (TEST Dev GPG Key) <[email protected]> // ssb 2048g/50B959DD 2016-02-12 –Emerson

1 Answers

0
votes

during decryption process type gpg --allow-secret-key-import --import PrivateKey.gpg after that prompt will appear for passphrase, enter the passphrase and after that decrypt file using gpg filename.gpg