--- pgp/src/rsaglue2.c 2018/04/24 16:42:00 1.1.1.2 +++ pgp/src/rsaglue2.c 2018/04/24 16:43:22 1.1.1.3 @@ -1,13 +1,19 @@ /* * rsaglue2.c - These functions wrap and unwrap message digests (MDs) and * data encryption keys (DEKs) in padding and RSA-encrypt them into - * multi-precision integers. This layer was introduced to allow the - * transparent use of RSAREF for the encryption (where required by - * patent law) or Philip Zimmermann's mpi library (where permitted, such - * as Canada). + * multi-precision integers. This layer of abstraction was introduced + * to allow the transparent use of either the RSAREF Cryptographic + * Toolkit from RSA Data Security Inc for the RSA calculations (where + * the RSA patent applies), or, by using a different version of this + * rsaglue module, we can use Philip Zimmermann's mpi library for the + * RSA calculations. The rsaglue.c module from PGP version 2.3a performs + * the same functions as this module, but can be compiled to select the + * use of mpilib functions instead of RSAREF as the underlying math engine. + * That version of rsaglue.c would be suitable where the RSA patent does + * not apply, such as Canada. * * This file uses RSAREF to perform the actual encryption and decryption. - * It must be linked with the RSAREF 2.0 library (rsaref.a, rsaref.lib, + * It must be linked with the RSAREF library (rsaref.a, rsaref.lib, * or whatever it's called on your system) to function. * * This code only accepts PKCS-style padding. Sorry, folks, but the @@ -42,7 +48,9 @@ #include "random.h" /* for cryptRandByte() */ #include "language.h" /* for _LANG() */ -char signon_legalese[] = _LANG("Distributed by the Massachusetts Institute of Technology. Uses RSAREF.\n"); +char signon_legalese[] = +_LANG("Distributed by the Massachusetts Institute of Technology. \ +Uses RSAREF.\n"); #include #include @@ -396,10 +404,10 @@ Corrupted: * Stub to replace RSAREF's NN_ModExp with a call to the mpilib's * faster mp_modexp. (A bit over 3x faster on an IBM PC.) * It's too bad that RSAREF's NN routines are pretty clean, while the - * mpilib is attractive only to the sort of people who like dead baby - * jokes. But the mpilib is pretty fast, especially on 16-bit machines, - * so this Bride of Frankenstein creation has reason for existence. - * + * mpilib is a hard-to-follow kludge. But the mpilib is pretty fast, + * especially on 16-bit machines, so the kludginess is forgivable. + * Note that we are still using RSAREF, but we are just using a faster + * modulo exponentiation routine. * If you comment out the following block of code, you get a (much slower) * pure RSAREF version. */