Commit 080b8cad authored by Richard Levitte's avatar Richard Levitte
Browse files

Since there has been reports of clashes between OpenSSL's

des_encrypt() and des_encrypt() defined on some systems (Solaris and
Unixware and maybe others), we rename des_encrypt() to des_encrypt1().
This should have very little impact on external software unless
someone has written a mode of DES, since that's all des_encrypt() is
meant for.
parent 7cdd2aa1
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -4,6 +4,11 @@

 Changes between 0.9.6 and 0.9.7  [xx XXX 2000]

  *) Rename 'des_encrypt' to 'des_encrypt1'.  This avoids the clashes
     with des_encrypt() defined on some operating systems, like Solaris
     and UnixWare.
     [Richard Levitte]

  *) Check the result of RSA-CRT (see D. Boneh, R. DeMillo, R. Lipton:
     On the Importance of Eliminating Errors in Cryptographic
     Computations, J. Cryptology 14 (2001) 2, 101-119,
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ DES_LONG des_cbc_cksum(const unsigned char *in, des_cblock *output,
			
		tin0^=tout0; tin[0]=tin0;
		tin1^=tout1; tin[1]=tin1;
		des_encrypt((DES_LONG *)tin,schedule,DES_ENCRYPT);
		des_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT);
		/* fix 15/10/91 eay - thanks to keithr@sco.COM */
		tout0=tin[0];
		tout1=tin[1];
+2 −2
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ void des_cfb64_encrypt(const unsigned char *in, unsigned char *out,
				{
				c2l(iv,v0); ti[0]=v0;
				c2l(iv,v1); ti[1]=v1;
				des_encrypt(ti,schedule,DES_ENCRYPT);
				des_encrypt1(ti,schedule,DES_ENCRYPT);
				iv = &(*ivec)[0];
				v0=ti[0]; l2c(v0,iv);
				v0=ti[1]; l2c(v0,iv);
@@ -102,7 +102,7 @@ void des_cfb64_encrypt(const unsigned char *in, unsigned char *out,
				{
				c2l(iv,v0); ti[0]=v0;
				c2l(iv,v1); ti[1]=v1;
				des_encrypt(ti,schedule,DES_ENCRYPT);
				des_encrypt1(ti,schedule,DES_ENCRYPT);
				iv = &(*ivec)[0];
				v0=ti[0]; l2c(v0,iv);
				v0=ti[1]; l2c(v0,iv);
+2 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ void des_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
			l-=n;
			ti[0]=v0;
			ti[1]=v1;
			des_encrypt((DES_LONG *)ti,schedule,DES_ENCRYPT);
			des_encrypt1((DES_LONG *)ti,schedule,DES_ENCRYPT);
			c2ln(in,d0,d1,n);
			in+=n;
			d0=(d0^ti[0])&mask0;
@@ -132,7 +132,7 @@ void des_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
			l-=n;
			ti[0]=v0;
			ti[1]=v1;
			des_encrypt((DES_LONG *)ti,schedule,DES_ENCRYPT);
			des_encrypt1((DES_LONG *)ti,schedule,DES_ENCRYPT);
			c2ln(in,d0,d1,n);
			in+=n;
			/* 30-08-94 - eay - changed because l>>32 and
+4 −4
Original line number Diff line number Diff line
@@ -153,14 +153,14 @@ void des_ecb_encrypt(const_des_cblock *input,des_cblock *output,
	Data is a pointer to 2 unsigned long's and ks is the
	des_key_schedule to use.  enc, is non zero specifies encryption,
	zero if decryption. */
void des_encrypt(DES_LONG *data,des_key_schedule ks, int enc);
void des_encrypt1(DES_LONG *data,des_key_schedule ks, int enc);

/* 	This functions is the same as des_encrypt() except that the DES
/* 	This functions is the same as des_encrypt1() except that the DES
	initial permutation (IP) and final permutation (FP) have been left
	out.  As for des_encrypt(), you should not use this function.
	out.  As for des_encrypt1(), you should not use this function.
	It is used by the routines in the library that implement triple DES.
	IP() des_encrypt2() des_encrypt2() des_encrypt2() FP() is the same
	as des_encrypt() des_encrypt() des_encrypt() except faster :-). */
	as des_encrypt1() des_encrypt1() des_encrypt1() except faster :-). */
void des_encrypt2(DES_LONG *data,des_key_schedule ks, int enc);

void des_encrypt3(DES_LONG *data, des_key_schedule ks1,
Loading