RSA & IDEA Howto (Was Re: Signing (with) old pgp 2 keys)

Dave Harvill dlh at
Wed Jul 21 21:26:48 CEST 1999

Hash: SHA1

okay, mine has the #ifndef USEMPILIB <code, code> #endif also.  I add the
- -DUSEMPILIB to the INCL on the makefile.  Now I get errors about undefined
references from rsaref.a :

- ----snip----
cc -o rdemo rdemo.o rsaref.a
rsaref.a(prime.o): In function `FermatTest':
prime.c(.text+0x640): undefined reference to `NN_ModExp'
prime.c(.text+0x644): undefined reference to `NN_ModExp'
rsaref.a(rsa.o): In function `RSAPublicBlock':
rsa.c(.text+0xa28): undefined reference to `NN_ModExp'
rsa.c(.text+0xa2c): undefined reference to `NN_ModExp'
rsaref.a(rsa.o): In function `RSAPrivateBlock':
rsa.c(.text+0xd94): undefined reference to `NN_ModExp'
rsaref.a(rsa.o)(.text+0xd98):rsa.c: more undefined references to
`NN_ModExp' follow
collect2: ld returned 1 exit status
make: *** [rdemo] Error 1
- ----end snip----

I see what's going on, how an implementation in rsaref.c of the NN_ModExp
function is supposed to be replacing an older implementation of the same
function in nn.c.  My problem feels chicken&egg-ish in nature.  rsaref.a
won't compile without the NN_ModExp defined (which is in rsaref.c).
rsaref.c won't compile without rsaref.a library in place.  I have tried
modifying the makefile so that they are copmiled together, but that only
seems to compond the number of errors I receive.  [This is quite a blow to
my ego, compiling and makefiles are something (I thought) I knew quite
well]  If anyone can explain what is probably a rather obvious error, I
would be most appreciative

- -dave

On Wed, 21 Jul 1999, Dave Dykstra wrote:

> The original NN_ModExp function was very slow so people (beginning with
> Phil Zimmerman) wrote replacements.  Compile it out in nn.c.  The version
> I have has a USEMPILIB define around it, so I add -DUSEMPILIB to the
> INCL line in install/unix/makefile.
> - Dave Dykstra

dlh at
Version: GnuPG v0.9.8 (GNU/Linux)
Comment: For info see


More information about the Gnupg-devel mailing list