How to add my own algorithm to gnupg?
dshaw at jabberwocky.com
Fri Aug 29 15:06:01 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
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.
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.3-cvs (GNU/Linux)
Comment: Key available at http://www.jabberwocky.com/david/keys.asc
-----END PGP SIGNATURE-----
More information about the Gnupg-devel