From 46ce01c89d9837c0489d544f3499e4fa1628bd1a Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 27 Jun 2014 10:56:33 -0400 Subject: [PATCH] fixed tunnel encryption for non-AESNI --- aes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aes.cpp b/aes.cpp index 518d5c58..458654ec 100644 --- a/aes.cpp +++ b/aes.cpp @@ -313,6 +313,7 @@ namespace crypto ); #else m_IVEncryption.Encrypt ((ChipherBlock *)payload, (ChipherBlock *)payload); // iv + m_LayerEncryption.SetIV (payload); m_LayerEncryption.Encrypt (payload + 16, i2p::tunnel::TUNNEL_DATA_ENCRYPTED_SIZE, payload + 16); // data m_IVEncryption.Encrypt ((ChipherBlock *)payload, (ChipherBlock *)payload); // double iv #endif @@ -348,6 +349,7 @@ namespace crypto ); #else m_IVDecryption.Decrypt ((ChipherBlock *)payload, (ChipherBlock *)payload); // iv + m_LayerDecryption.SetIV (payload); m_LayerDecryption.Decrypt (payload + 16, i2p::tunnel::TUNNEL_DATA_ENCRYPTED_SIZE, payload + 16); // data m_IVDecryption.Decrypt ((ChipherBlock *)payload, (ChipherBlock *)payload); // double iv #endif