Switching to libtomcrypt 1.02

(still has problems)

--HG--
extra : convert_revision : 4dfd70544ed9a766876ddda9f6ac3f26054eb3db
This commit is contained in:
Matt Johnston
2005-05-09 09:32:33 +00:00
parent eb741b9cc9
commit 7b403dc57f
4 changed files with 8 additions and 5 deletions

View File

@@ -201,6 +201,7 @@ static void read_packet_init() {
/* decrypt it */
if (cbc_decrypt(buf_getptr(ses.readbuf, blocksize),
buf_getwriteptr(ses.decryptreadbuf,blocksize),
blocksize,
&ses.keys->recv_symmetric_struct) != CRYPT_OK) {
dropbear_exit("error decrypting");
}
@@ -254,6 +255,7 @@ void decrypt_packet() {
while (ses.readbuf->pos < ses.readbuf->len - macsize) {
if (cbc_decrypt(buf_getptr(ses.readbuf, blocksize),
buf_getwriteptr(ses.decryptreadbuf, blocksize),
blocksize,
&ses.keys->recv_symmetric_struct) != CRYPT_OK) {
dropbear_exit("error decrypting");
}
@@ -491,6 +493,7 @@ void encrypt_packet() {
while (clearwritebuf->pos < clearwritebuf->len) {
if (cbc_encrypt(buf_getptr(clearwritebuf, blocksize),
buf_getwriteptr(writebuf, blocksize),
blocksize,
&ses.keys->trans_symmetric_struct) != CRYPT_OK) {
dropbear_exit("error encrypting");
}