Lines 89-99
Link Here
|
89 |
{ |
89 |
{ |
90 |
EcpState const ecp = &b->ecp; |
90 |
EcpState const ecp = &b->ecp; |
91 |
DeseBisInfo const des = &ecp->desebis; |
91 |
DeseBisInfo const des = &ecp->desebis; |
92 |
des_cblock key; |
92 |
DES_cblock key; |
93 |
|
93 |
|
94 |
des_check_key = FALSE; |
94 |
DES_string_to_key(ecp->key, &key); |
95 |
des_string_to_key(ecp->key, &key); |
95 |
DES_set_key(&key, &des->ks); |
96 |
des_set_key(&key, des->ks); |
|
|
97 |
des->xmit_seq = 0; |
96 |
des->xmit_seq = 0; |
98 |
des->recv_seq = 0; |
97 |
des->recv_seq = 0; |
99 |
} |
98 |
} |
Lines 204-210
Link Here
|
204 |
{ |
203 |
{ |
205 |
u_char *const block = MBDATA(cypher) + DES_OVERHEAD + k; |
204 |
u_char *const block = MBDATA(cypher) + DES_OVERHEAD + k; |
206 |
|
205 |
|
207 |
des_cbc_encrypt(block, block, 8, des->ks, &des->xmit_ivec, TRUE); |
206 |
DES_cbc_encrypt(block, block, 8, &des->ks, &des->xmit_ivec, TRUE); |
208 |
memcpy(des->xmit_ivec, block, 8); |
207 |
memcpy(des->xmit_ivec, block, 8); |
209 |
} |
208 |
} |
210 |
|
209 |
|
Lines 272-281
Link Here
|
272 |
for (k = 0; k < clen; k += 8) |
271 |
for (k = 0; k < clen; k += 8) |
273 |
{ |
272 |
{ |
274 |
u_char *const block = MBDATA(plain) + k; |
273 |
u_char *const block = MBDATA(plain) + k; |
275 |
des_cblock next_ivec; |
274 |
DES_cblock next_ivec; |
276 |
|
275 |
|
277 |
memcpy(next_ivec, block, 8); |
276 |
memcpy(next_ivec, block, 8); |
278 |
des_cbc_encrypt(block, block, 8, des->ks, &des->recv_ivec, FALSE); |
277 |
DES_cbc_encrypt(block, block, 8, &des->ks, &des->recv_ivec, FALSE); |
279 |
memcpy(des->recv_ivec, next_ivec, 8); |
278 |
memcpy(des->recv_ivec, next_ivec, 8); |
280 |
} |
279 |
} |
281 |
|
280 |
|