Mailing List Archive

Re-using GnuPG code
I'm working on an abstraction layer library, and now that I need to
incorporate encryption, I was thinking about using some of the GnuPG code,
since the work is already done here. The library is to be announced within two
months, and will be GPLed.

What I wanted to ask is, can anyone give me hints or pointers into the code,
to make the transfer as simple and clean as possible? I'm interested in
extracting the core functions, for key generation, en- and decryption.

I also noticed that a library for public key encryption was mentioned on the
GNU task list. Is anyone working on this? If not, my abstraction can be
transferred directly to such a library also.

If I've missed some better option, please tell me.

--
Hans Petter Jansson
hpj@teletopia.no
Re: Re-using GnuPG code [ In reply to ]
On Sat, 27 Mar 1999, Hans Petter Jansson wrote:

> I'm working on an abstraction layer library, and now that I need to
> incorporate encryption, I was thinking about using some of the GnuPG code,
> since the work is already done here. The library is to be announced within two
> months, and will be GPLed.

Check out the develoment version of GnuPG by CVS and you will see that in
the directory 'gnupg/gcrypt' their is a encryption library in progress.
However, it is not finished yet...


> What I wanted to ask is, can anyone give me hints or pointers into the code,

First, look at the filtering stuff of GnuPG in 'gnupg/util/iobuf.c'. It is
important to understand the buffering concept before you try to learn
more about GnuPG.
Second, check out 'gnupg/cipher/cipher.c' and its implementations (des.c,
blowfish.c and so on). Same for 'gnupg/cipher/md.c' and its
implementations.
Third, try to understand all in 'gnupg/g10/*.c' ;-) A good starting point
is g10.c and encode.c.

At least, this way worked very well for me a year ago. Of course you
should read all in 'gnupg/doc/*'.


cu
Michael