Lines 1-4
Link Here
|
1 |
--- rijndael.cpp.orig 2018-06-24 15:10:31 UTC |
1 |
--- rijndael.cpp.orig 2019-04-27 20:05:20 UTC |
2 |
+++ rijndael.cpp |
2 |
+++ rijndael.cpp |
3 |
@@ -7,6 +7,8 @@ |
3 |
@@ -7,6 +7,8 @@ |
4 |
***************************************************************************/ |
4 |
***************************************************************************/ |
Lines 59-65
Link Here
|
59 |
#ifdef USE_SSE |
59 |
#ifdef USE_SSE |
60 |
// Check SSE here instead of constructor, so if object is a part of some |
60 |
// Check SSE here instead of constructor, so if object is a part of some |
61 |
// structure memset'ed before use, this variable is not lost. |
61 |
// structure memset'ed before use, this variable is not lost. |
62 |
@@ -111,6 +141,7 @@ void Rijndael::Init(bool Encrypt,const b |
62 |
@@ -114,6 +144,7 @@ void Rijndael::Init(bool Encrypt,const b |
63 |
|
63 |
|
64 |
if(!Encrypt) |
64 |
if(!Encrypt) |
65 |
keyEncToDec(); |
65 |
keyEncToDec(); |
Lines 67-73
Link Here
|
67 |
} |
67 |
} |
68 |
|
68 |
|
69 |
void Rijndael::blockEncrypt(const byte *input,size_t inputLen,byte *outBuffer) |
69 |
void Rijndael::blockEncrypt(const byte *input,size_t inputLen,byte *outBuffer) |
70 |
@@ -118,6 +149,15 @@ void Rijndael::blockEncrypt(const byte * |
70 |
@@ -121,6 +152,15 @@ void Rijndael::blockEncrypt(const byte * |
71 |
if (inputLen <= 0) |
71 |
if (inputLen <= 0) |
72 |
return; |
72 |
return; |
73 |
|
73 |
|
Lines 83-89
Link Here
|
83 |
size_t numBlocks = inputLen/16; |
83 |
size_t numBlocks = inputLen/16; |
84 |
#ifdef USE_SSE |
84 |
#ifdef USE_SSE |
85 |
if (AES_NI) |
85 |
if (AES_NI) |
86 |
@@ -176,6 +216,7 @@ void Rijndael::blockEncrypt(const byte * |
86 |
@@ -179,6 +219,7 @@ void Rijndael::blockEncrypt(const byte * |
87 |
input += 16; |
87 |
input += 16; |
88 |
} |
88 |
} |
89 |
Copy128(m_initVector,prevBlock); |
89 |
Copy128(m_initVector,prevBlock); |
Lines 91-97
Link Here
|
91 |
} |
91 |
} |
92 |
|
92 |
|
93 |
|
93 |
|
94 |
@@ -217,6 +258,15 @@ void Rijndael::blockDecrypt(const byte * |
94 |
@@ -220,6 +261,15 @@ void Rijndael::blockDecrypt(const byte * |
95 |
if (inputLen <= 0) |
95 |
if (inputLen <= 0) |
96 |
return; |
96 |
return; |
97 |
|
97 |
|
Lines 107-113
Link Here
|
107 |
size_t numBlocks=inputLen/16; |
107 |
size_t numBlocks=inputLen/16; |
108 |
#ifdef USE_SSE |
108 |
#ifdef USE_SSE |
109 |
if (AES_NI) |
109 |
if (AES_NI) |
110 |
@@ -279,6 +329,8 @@ void Rijndael::blockDecrypt(const byte * |
110 |
@@ -282,6 +332,8 @@ void Rijndael::blockDecrypt(const byte * |
111 |
} |
111 |
} |
112 |
|
112 |
|
113 |
memcpy(m_initVector,iv,16); |
113 |
memcpy(m_initVector,iv,16); |
Lines 116-122
Link Here
|
116 |
} |
116 |
} |
117 |
|
117 |
|
118 |
|
118 |
|
119 |
@@ -314,7 +366,7 @@ void Rijndael::blockDecryptSSE(const byt |
119 |
@@ -317,7 +369,7 @@ void Rijndael::blockDecryptSSE(const byt |
120 |
} |
120 |
} |
121 |
#endif |
121 |
#endif |
122 |
|
122 |
|
Lines 125-131
Link Here
|
125 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
125 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
126 |
// ALGORITHM |
126 |
// ALGORITHM |
127 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
127 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
128 |
@@ -454,7 +506,7 @@ void Rijndael::GenerateTables() |
128 |
@@ -457,7 +509,7 @@ void Rijndael::GenerateTables() |
129 |
U1[b][0]=U2[b][1]=U3[b][2]=U4[b][3]=T5[i][0]=T6[i][1]=T7[i][2]=T8[i][3]=FFmul0e(b); |
129 |
U1[b][0]=U2[b][1]=U3[b][2]=U4[b][3]=T5[i][0]=T6[i][1]=T7[i][2]=T8[i][3]=FFmul0e(b); |
130 |
} |
130 |
} |
131 |
} |
131 |
} |