--- rsaref/source/nn.c 2018/04/24 16:38:22 1.1.1.2 +++ rsaref/source/nn.c 2018/04/24 16:38:54 1.1.1.3 @@ -5,16 +5,6 @@ Inc., created 1991. All rights reserved. */ -/* CHANGES MADE TO THIS FILE UNDER RSAREF 2.0 license clause 1(c): - - For the MIT PGP 2.5 distribution, this file was modified to permit - replacement of the NN_ModExp routine by an equivalent routine contained - in the PGP 2.5 sources. To enable this change, an #ifdef was added to this - file (search for #ifndef USEMPILIB below). RSAREF *must* be compiled with - USEMPILIB defined for this change to occur. - - Change made May 8, 1994. */ - #include "global.h" #include "rsaref.h" #include "nn.h" @@ -361,16 +351,6 @@ unsigned int digits; Lengths: a[dDigits], b[dDigits], c[cDigits], d[dDigits]. Assumes d > 0, cDigits > 0, dDigits < MAX_NN_DIGITS. */ - -/* PGP 2.5's mpilib contains a faster modular exponentiation routine, mp_modexp. - If USEMPILIB is defined, NN_ModExp is replaced in the PGP 2.5 sources with a - stub call to mp_modexp. If USEMPILIB is not defined, we'll get a pure (albeit - slower) RSAREF implementation. - - The RSAREF 2.0 license, clause 1(c), permits "...modify[ing] the Program in any - manner for porting or performance improvement purposes..." */ - -#ifndef USEMPILIB void NN_ModExp (a, b, c, cDigits, d, dDigits) NN_DIGIT *a, *b, *c, *d; unsigned int cDigits, dDigits; @@ -418,7 +398,6 @@ unsigned int cDigits, dDigits; R_memset ((POINTER)bPower, 0, sizeof (bPower)); R_memset ((POINTER)t, 0, sizeof (t)); } -#endif /* Compute a = 1/b mod c, assuming inverse exists.