140
140
DES_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc);
144
/* This is compatible with the single key CFB-r for DES, even thought that's
145
* not what EVP needs.
148
void DES_ede3_cfb_encrypt(const unsigned char *in,unsigned char *out,
149
int numbits,long length,DES_key_schedule *ks1,
150
DES_key_schedule *ks2,DES_key_schedule *ks3,
151
DES_cblock *ivec,int enc)
153
register DES_LONG d0,d1,v0,v1;
154
register long l=length;
155
register int num=numbits,n=(numbits+7)/8,i;
158
unsigned char ovec[16];
160
if (num > 64) return;
171
DES_encrypt3(ti,ks1,ks2,ks3);
178
/* 30-08-94 - eay - changed because l>>32 and
179
* l<<32 are bad under gcc :-( */
191
/* shift ovec left most of the bits... */
192
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
193
/* now the remaining bits */
195
for(i=0 ; i < 8 ; ++i)
198
ovec[i]|=ovec[i+1]>>(8-num%8);
213
DES_encrypt3(ti,ks1,ks2,ks3);
216
/* 30-08-94 - eay - changed because l>>32 and
217
* l<<32 are bad under gcc :-( */
229
/* shift ovec left most of the bits... */
230
memmove(ovec,ovec+num/8,8+(num%8 ? 1 : 0));
231
/* now the remaining bits */
233
for(i=0 ; i < 8 ; ++i)
236
ovec[i]|=ovec[i+1]>>(8-num%8);
251
v0=v1=d0=d1=ti[0]=ti[1]=0;