[Gpg4win-devel] PASS PHRASE Handling in frontend

Marcus Brinkmann marcus.brinkmann at ruhr-uni-bochum.de
Mon Oct 2 11:49:53 CEST 2006


At Mon, 2 Oct 2006 12:16:33 +0530,
"Vineet Madan" <vineet1408 at gmail.com> wrote:
> i am building a frontend for gpg and want to know as to how is pass phrase
> handled . Frontend would imply running key generation in automated
> enviroment.
> 
> so where is passphrase stored . how and where is it fed while decryption. i
> want to know the flow path of pass phrase while dealing with key gen and
> encryption/ decryption process.

It's a good idea to use the gpg-agent and pinentry daemons.  This way
you don't need to worry about it at all, gpg will find its own way to
get at the passphrase.  This can also be scripted with a preset
password command.

Otherwise, with GPG, use --status-fd (you should already know about
this!) and --command-fd for the passphrase.  See gnupg/doc/DETAILS and
the GPGME source code for details.  You are pretty much on your own
here: The infrastructure is there, but not that well documented.
Reading the source helps.

However, the best option may be to simply use GPGME, which already
does all the work for you.  It's called GPGME for a reason: GPG Made
Easy.  In this case, just check out the extensive documentation that
comes with GPGME for help how to install a passphrase callback
handler.

Thanks,
Marcus





More information about the Gpg4win-devel mailing list