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

Dave Dykstra dwd at bell-labs.com
Thu Jul 22 10:03:22 CEST 1999


On Jul 21,  8:26pm, Dave Harvill wrote:
> 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


Just don't build rdemo.  This is how I make it:
    cd rsaref2/install/unix; make CC="$(CC) -shared -fPIC" rsaref.a

- Dave Dykstra



More information about the Gnupg-devel mailing list