summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/xcbc_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/des/xcbc_enc.c')
-rw-r--r--src/lib/libcrypto/des/xcbc_enc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/des/xcbc_enc.c b/src/lib/libcrypto/des/xcbc_enc.c
index dc0c761b71..47246eb466 100644
--- a/src/lib/libcrypto/des/xcbc_enc.c
+++ b/src/lib/libcrypto/des/xcbc_enc.c
@@ -60,7 +60,6 @@
60 60
61/* RSA's DESX */ 61/* RSA's DESX */
62 62
63#if 0 /* broken code, preserved just in case anyone specifically looks for this */
64static unsigned char desx_white_in2out[256]={ 63static unsigned char desx_white_in2out[256]={
650xBD,0x56,0xEA,0xF2,0xA2,0xF1,0xAC,0x2A,0xB0,0x93,0xD1,0x9C,0x1B,0x33,0xFD,0xD0, 640xBD,0x56,0xEA,0xF2,0xA2,0xF1,0xAC,0x2A,0xB0,0x93,0xD1,0x9C,0x1B,0x33,0xFD,0xD0,
660x30,0x04,0xB6,0xDC,0x7D,0xDF,0x32,0x4B,0xF7,0xCB,0x45,0x9B,0x31,0xBB,0x21,0x5A, 650x30,0x04,0xB6,0xDC,0x7D,0xDF,0x32,0x4B,0xF7,0xCB,0x45,0x9B,0x31,0xBB,0x21,0x5A,
@@ -99,7 +98,7 @@ void DES_xwhite_in2out(const_DES_cblock *des_key, const_DES_cblock *in_white,
99 } 98 }
100 99
101 out0=out[0]; 100 out0=out[0];
102 out1=out[i]; /* BUG: out-of-bounds read */ 101 out1=out[i];
103 for (i=0; i<8; i++) 102 for (i=0; i<8; i++)
104 { 103 {
105 out[i]=in[i]^desx_white_in2out[out0^out1]; 104 out[i]=in[i]^desx_white_in2out[out0^out1];
@@ -107,7 +106,6 @@ void DES_xwhite_in2out(const_DES_cblock *des_key, const_DES_cblock *in_white,
107 out1=(int)out[i&0x07]; 106 out1=(int)out[i&0x07];
108 } 107 }
109 } 108 }
110#endif
111 109
112void DES_xcbc_encrypt(const unsigned char *in, unsigned char *out, 110void DES_xcbc_encrypt(const unsigned char *in, unsigned char *out,
113 long length, DES_key_schedule *schedule, 111 long length, DES_key_schedule *schedule,