key handling ?s

Werner Koch
Tue, 03 Jun 2003 10:36:49 +0200

On Thu, 29 May 2003 15:22:28 -0500, Warren, Tony said:

> all the libgcrypt functions transparently.  It would be nice if
> there were an export-key function for either public keys (useful) or
> secret keys (useful for me, but scary in general).

I have such code in gpg-agent and gpg-protect-tool from the
Aegypten/newpg project.  Get the latest tarball from . You will find
the files below agent/
>> the most correct method?  Is it possible/better to save the
>> publicKey in another format that is more straightforward? (like
>> gpg's ascii-armored -- can Libgcrypt de-armor & make an sexp from

The format gpg-agent stores its secret keys is described in
agent/keyformat.txt; code is mainly in agent/protect.c .

  Nonviolence is the greatest force at the disposal of
  mankind. It is mightier than the mightiest weapon of
  destruction devised by the ingenuity of man. -Gandhi