Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: users

unable to preset passphrase

 

 

GnuPG users RSS feed   Index | Next | Previous | View Threaded


yanaty999 at yahoo

Apr 19, 2012, 2:08 PM

Post #1 of 2 (552 views)
Permalink
unable to preset passphrase

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.
I run the statement (from a batch file):
---------------
gpg-agent --daemon --verbose --allow-preset-passphrase
echo abc | gpg-preset-passphrase --passphraseMyPhrase --preset 56E0E3E911D2E485189CAF087ED5DCF802FB4D8
------------
..and receive an error message:
gpg-preset-passphrase: problem with the agent
gpg-preset-passphrase: caching passphrase failed: Invalid response

I ran the following interactive session:gpg-agent.exe --server --allow-preset-passphrase
OK Pleased to meet you
OPTION ttyname = /dev/ttyp0
OK
OPTION ttytype=xterm
OK
OPTION lc-ctype=C
OK
OPTION lc-messages=C
OK
PRESET_PASSPHRASE 56E06E3E911D2E485189CAF087ED5DCF802FB4D8 -1 MyPhrase
ERR 67109144 IPC parameter error <GPG Agent> - invalid hexstring

It says "invalid hexstring"!
I have the only secret key on this machine, and to find its keygrip or its substitute I ran:
--------------gpg2 --fingerprint --fingerprint
-----------
../AppData/Roaming/gnupg/pubring.gpg
-------------------------------------------------------------
pub 2048R/79949D47 2012-04-05
Key fingerprint = 2E9E EC17 61C1 CFB9 1B67 9A17 388C CF06 7994 9D47
uid MyName <MyEmail>
sub 2048R/802FB4D8 2012-04-05
Key fingerprint = 56E0 6E3E 911D 2E48 5189 CAF0 87ED 5DCF 802F B4D8

What am I doing wrong?
Thank you, -
Tatyana


wk at gnupg

Apr 20, 2012, 5:06 AM

Post #2 of 2 (521 views)
Permalink
Re: unable to preset passphrase [In reply to]

On Thu, 19 Apr 2012 23:08, yanaty999 [at] yahoo 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
passphrases.


> 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.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users

GnuPG users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.