Mailing List Archive

Decrypting programmatically.
GNUPG Users,

I'm working on a personal project that involves moving PGP encrypted files
back and forth between a couple of FTP servers. I am able to encrypted
the files in my application by just executing a sub-process that passes
all relevant commands via the command line. My problem is that I cannot
decrypt the files in my application because there seems to be no way of
passing the "pass phrase" via the command line. I know that other
versions of PGP have a "-z passphrase" option that will allow you to
decrypt a file without the interactive passphrase gathering. Is there a
way to do this with GNUPG? I'd really like to be able to use this
product, as it seems to work very good, but I have to be able to decrypt
the files from within my Java application. I don't want to have to buy
the PGP Business Edition, but that seems to be the only way to
accomplish what I need. Any ideas? This is currently a personal project,
but licensing is a concern if I have to use PGP instead of GNUPG.

Please CC jesse@quasistatic.com on any replys, as I'm not currently a
member of this mailing list.

Thank you for any insight.

Jesse O'Neill Oine
jesse@quasistatic.com

< q u a s i s t a t i c . c o m >
Re: Decrypting programmatically. [ In reply to ]
jesse.oneill.oine, at 13:24 -0500 on Mon, 10 Apr 2000, wrote:

> passing the "pass phrase" via the command line. I know that other
> versions of PGP have a "-z passphrase" option that will allow you to
> decrypt a file without the interactive passphrase gathering. Is there a

This is not allowed because on pretty much all unixes one can see everyone
else's command-line arguments; hence, the passphrase could be seen by any
other user on the system.

The general way of passing in a passphrase to GnuPG is to do so via a
handle specified in the passphrase-fd option; I don't know if you can
accomplish this with Java though. There are Perl modules that allow you
to accomplish this farily easily, though.


--
Frank Tobin http://www.uiuc.edu/~ftobin/

"To learn what is good and what is to be valued,
those truths which cannot be shaken or changed." Myst: The Book of Atrus