Can I use gpg-agent to do this?

Emil Ong emilong at cs.berkeley.edu
Mon Jan 12 12:49:46 CET 2004


Hi,

I'm writing an application in Java in which I need to do encryption and
signing of messages.  My application will be running on a cluster and each
node will have distinct keys.  The nodes communicate with each other using
signed and encrypted messages (this is a simulation of a P2P system), but
I'm not talking about a channel encryption (e.g. SSL) issue.

What I'd like to do is be able to connect to the locally running gpg-agent
(using the environment variables), have it do the encryption or
signing, and then return the result to me.  The benefits I'm hoping
for are (1) that I don't have to worry about which key is needed to do
signing/encryption (i.e. I'd like to make the assumption that there is a
default (but configurable) key that the agent uses to sign and encrypt),
(2) all crypto operations take place in one single, secure process, and
(3) I can avoid having to worry about importing keys into Java's api.

Is this possible with gpg-agent (particularly, the encryption part)?  Is
it a reasonable use of the agent?  I'm asking this because I read the
info file from gnupg 1.9.3 and my impression is that the agent doesn't
do encryption.  Any ideas are appreciated.

Thanks!
Emil




More information about the Gnupg-users mailing list