75 #ifdef POK_NEEDS_PROTOCOLS_DES
82 register DES_LONG l,r,t,u;
84 register const unsigned char *des_SP=(
const unsigned char *)DES_SPtrans;
103 r=ROTATE(r,29)&0xffffffffL;
104 l=ROTATE(l,29)&0xffffffffL;
129 for (i=0; i<32; i+=8)
158 for (i=30; i>0; i-=8)
169 l=ROTATE(l,3)&0xffffffffL;
170 r=ROTATE(r,3)&0xffffffffL;
180 register DES_LONG l,r,t,u;
182 register const unsigned char *des_SP=(
const unsigned char *)DES_SPtrans;
187 register DES_LONG *s;
199 r=ROTATE(r,29)&0xffffffffL;
200 l=ROTATE(l,29)&0xffffffffL;
225 for (i=0; i<32; i+=8)
254 for (i=30; i>0; i-=8)
264 data[0]=ROTATE(l,3)&0xffffffffL;
265 data[1]=ROTATE(r,3)&0xffffffffL;
272 register DES_LONG l,r;
279 DES_encrypt2((DES_LONG *)data,ks1,DES_ENCRYPT);
280 DES_encrypt2((DES_LONG *)data,ks2,DES_DECRYPT);
281 DES_encrypt2((DES_LONG *)data,ks3,DES_ENCRYPT);
292 register DES_LONG l,r;
299 DES_encrypt2((DES_LONG *)data,ks3,DES_DECRYPT);
300 DES_encrypt2((DES_LONG *)data,ks2,DES_ENCRYPT);
301 DES_encrypt2((DES_LONG *)data,ks1,DES_DECRYPT);
309 #ifndef DES_DEFAULT_OPTIONS
311 #if !defined(OPENSSL_FIPS_DES_ASM)
313 #undef CBC_ENC_C__DONT_UPDATE_IV
314 #include "ncbc_enc.c"
316 void DES_ede3_cbc_encrypt(
const unsigned char *input,
unsigned char *output,
319 DES_cblock *ivec,
int enc)
321 register DES_LONG tin0,tin1;
322 register DES_LONG tout0,tout1,xor0,xor1;
323 register const unsigned char *in;
325 register long l=length;
337 for (l-=8; l>=0; l-=8)
346 DES_encrypt3((DES_LONG *)tin,ks1,ks2,ks3);
355 c2ln(in,tin0,tin1,l+8);
361 DES_encrypt3((DES_LONG *)tin,ks1,ks2,ks3);
374 register DES_LONG t0,t1;
378 for (l-=8; l>=0; l-=8)
388 DES_decrypt3((DES_LONG *)tin,ks1,ks2,ks3);
409 DES_decrypt3((DES_LONG *)tin,ks1,ks2,ks3);
415 l2cn(tout0,tout1,out,l+8);
424 tin0=tin1=tout0=tout1=xor0=xor1=0;