0

Can anyone help me out with this issue? When I run my decryption code, it asks for passphrase every time and fails if not entered. I want to automate this so that the passphrase is not asked every time. I'm using kleopatra to import/export public/secret keys with GPG4win installed.

Sowndarya
  • 59
  • 8

1 Answers1

0

I can understand your frustration, however, I believe that functionality is intended. If the private key were kept open for a time period or the passphrase cached, that would pose a security hole where either one could possibly leak.

While OSs have security measures in place to prevent other processes from reading memory that doesn't belong to them, there are still ways around this. The ways that come to mind first are more likely to be done in a research lab than real life, but security experts would still throw up red flags.

It is possible to use a command line to decrypt multiple files all at once, see how-to-use-gpg-to-decrypt-multiple-files-to-a-different-directory. Hope that helps.

Community
  • 1
  • 1
micker
  • 878
  • 6
  • 13
  • Thanks for your reply. But I cant use this functionality. In my requirement, it is like i should decrypt the file before a file transfer. (Using windows) So every time i get only one file to decrypt. So how to use command line for this. – Sowndarya May 31 '16 at 12:34
  • `gpg --passphrase THISISTHEPASSPHRASE -o C:\OUTPUTFILENAME -d C:\FILETODECRYPT.GPG` might be what you're looking for, but I would caution against it. Again you'll be putting the passphrase out there were malicious people can get to it. This will be visible in a batch script if that is where you choose to save it and in your command history. Up to you if that's acceptable risk. – micker May 31 '16 at 18:28