How to add my own algorithm to gnupg?
David Shaw
dshaw@jabberwocky.com
Fri Aug 29 14:06:01 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Aug 29, 2003 at 07:01:38PM +0800, Calvin wrote:
> Hi, there,
> Please reply to me explicitly for I'm in none of above mail list.
> Thanks.
>
> There is a line in gnupg "Feature" page, which says, "Easy
> implementation of new algorithms using extension modules."
>
> But I can't find where to configure to use my own algorithms. And what's
> the "extension modules" mean?
>
> Do I need to add my algorithm module to source code of gnupg and
> rebuild it? Or there is some easier way, just follow a specific
> interface in my module and register it into gnupg with some
> configuration file? Or the 3rd way?
The first way. The extension module feature was removed from GnuPG
for several reasons (portability, code simplicity, lack of use). To
add a new algorithm, you need to:
a) Write the code for your new algorithm. See the files in cipher/
for examples on the GnuPG interface for hashes (see sha1.c), public
key algorithms (see rsa.c), and symmetric algorithms (see dsa.c).
b) When you need an algorithm number, use something in the 100-110
range. These numbers are reserved for this sort of use.
c) Add your algorithm to the necessary table in GnuPG (cipher/md.c for
hashes, cipher/pubkey.c for public key, and cipher/cipher.c for
symmetric).
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.3-cvs (GNU/Linux)
Comment: Key available at http://www.jabberwocky.com/david/keys.asc
iHEEARECADEFAj9PQeUqGGh0dHA6Ly93d3cuamFiYmVyd29ja3kuY29tL2Rhdmlk
L2tleXMuYXNjAAoJEOJmXIdJ4cvJKV4AnjBmMauB39sby6+xdP09j1C46RahAKDi
TG19FW+Ia0vzlJ0V69ar326jaA==
=TsfM
-----END PGP SIGNATURE-----