unable to preset passphrase

Werner Koch wk at gnupg.org
Fri Apr 20 14:06:55 CEST 2012

On Thu, 19 Apr 2012 23:08, yanaty999 at yahoo.com said:
> I need to automate the porcess of receiving an decrypting files encrypted with a gpg key.
> Since this is supposed to be an unattended process I need to  preset a passphrase.

It would be easier and equally save not to protect the key at all.
However, I know that sometimes stupid security policies demands

> PRESET_PASSPHRASE 56E06E3E911D2E485189CAF087ED5DCF802FB4D8 -1 MyPhrase 
> ERR 67109144 IPC parameter error <GPG Agent> - invalid hexstring
> It says "invalid hexstring"!

If you want to give the passphrase on the command line you need to pass
it hex encoded:

PRESET_PASSPHRASE 56E06E3E911D2E485189CAF087ED5DCF802FB4D8 -1 4D79506872617365

However, gpg-preset-passphrase should have done the hex encoding for you.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-users mailing list