aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--checks/validate.dat10
-rw-r--r--src/build-data/buildh.in8
-rw-r--r--src/hash/tiger/tiger.cpp30
-rw-r--r--src/hash/tiger/tiger.h1
-rw-r--r--src/utils/bswap.h22
5 files changed, 29 insertions, 42 deletions
diff --git a/checks/validate.dat b/checks/validate.dat
index 9d319eaf3..617be804c 100644
--- a/checks/validate.dat
+++ b/checks/validate.dat
@@ -23664,7 +23664,7 @@ DC7E84BFDA79164B7ECD8486985D38604FEBDC6740D20B3AC88F6AD82A4FB08D\
# From NIST Special Publication 800-XX (prerelease): "Recommendation for Block
# Cipher Modes of Operation"
-[AES/CTR-BE]
+[AES-128/CTR-BE]
6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E51\
30C81C46A35CE411E5FBC1191A0A52EFF69F2445DF4F9B17AD2B417BE66C3710:\
874D6191B620E3261BEF6864990DB6CE9806F66B7970FDFF8617187BB9FFFDFF\
@@ -23678,6 +23678,7 @@ AE2D8A571E03AC9C9EB76FAC45AF8E51\
5AE4DF3EDBD5D35E5B4F09020DB03EAB1E031DDA2FBE03D1792170A0F3009CEE:\
2B7E151628AED2A6ABF7158809CF4F3C:F0F1F2F3F4F5F6F7F8F9FAFBFCFDFF
+[AES-192/CTR-BE]
6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E51\
30C81C46A35CE411E5FBC1191A0A52EFF69F2445DF4F9B17AD2B417BE66C3710:\
1ABC932417521CA24F2B0459FE7E6E0B090339EC0AA6FAEFD5CCC2C6F4CE8E94\
@@ -23685,6 +23686,7 @@ AE2D8A571E03AC9C9EB76FAC45AF8E51\
8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:\
F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF
+[AES-256/CTR-BE]
6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E51\
30C81C46A35CE411E5FBC1191A0A52EFF69F2445DF4F9B17AD2B417BE66C3710:\
601EC313775789A5B7A7F504BBF3D228F443E3CA4D62B59ACA84E990CACAF5C5\
@@ -23692,7 +23694,7 @@ F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF
603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:\
F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF
-[AES/EAX]
+[AES-128/EAX]
:32E55CE0C3FAEA48164B122C1BE22D85:\
C61A0851AB4E515D11525B92E2B9D850:C825FC7C4D539DC74887CECC70884F37
@@ -23773,6 +23775,7 @@ E26112BE7A99FECC557C3D53674E6E670F824FE7784EFCCFA40BC88D4F88B5A29902171D:\
FB18B846F801571026BD501FFFE67E8D51D6AE9B8379A8676F65E2C7EE0D02E9FF9BBB23482C:\
30B6CF4FA2DDAE8CD2FC6ACAA5302B77:EEF619A392FEAC7DB491E4591088C041
+[AES/EAX]
814C87C4E33C797A93A77DB1F045996667A1C10D78123A:\
F5526447A82E275E9CAC44EDB940171F9123C3FDA7F55D\
8586CB574A00AFC12381F40964D096CD:\
@@ -23997,7 +24000,7 @@ C61A0851AB4E515D11525B92E2B9D850:C825FC7C4D539DC74887CECC70884F37
60:710DABD24D400F3B6B:\
F956B879EC7F807F1FCB482B53623671:E64F90B4619D93137E6237929EABF297
-[AES/XTS]
+[AES-128/XTS]
# Vectors are from IEEE P1619 D11
0000000000000000000000000000000000000000000000000000000000000000:\
@@ -24225,6 +24228,7 @@ B3D32466028D0BA36555E7E11AB0EE0666061D1645D962444BC47A38188930A8\
2718281828459045235360287471352631415926535897932384626433832795:\
FF000000000000000000000000000000
+[AES/XTS]
000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\
202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F\
404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F\
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index 7588dc99b..231a7aeeb 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -27,11 +27,11 @@
*
* CBC and CFB can only use parallel processing in decryption mode
*/
-#define BOTAN_PARALLEL_BLOCKS_ECB 8
-#define BOTAN_PARALLEL_BLOCKS_CBC 8
-#define BOTAN_PARALLEL_BLOCKS_CFB 8
+#define BOTAN_PARALLEL_BLOCKS_ECB 16
+#define BOTAN_PARALLEL_BLOCKS_CBC 16
+#define BOTAN_PARALLEL_BLOCKS_CFB 16
#define BOTAN_PARALLEL_BLOCKS_CTR 16
-#define BOTAN_PARALLEL_BLOCKS_XTS 8
+#define BOTAN_PARALLEL_BLOCKS_XTS 16
/* PK key consistency checking toggles */
#define BOTAN_PUBLIC_KEY_STRONG_CHECKS_ON_LOAD 1
diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp
index 4f4d4dc83..3013ab38e 100644
--- a/src/hash/tiger/tiger.cpp
+++ b/src/hash/tiger/tiger.cpp
@@ -12,6 +12,23 @@
namespace Botan {
+namespace {
+
+/*
+* Tiger Mixing Function
+*/
+inline void mix(u64bit X[8])
+ {
+ X[0] -= X[7] ^ 0xA5A5A5A5A5A5A5A5; X[1] ^= X[0];
+ X[2] += X[1]; X[3] -= X[2] ^ ((~X[1]) << 19); X[4] ^= X[3];
+ X[5] += X[4]; X[6] -= X[5] ^ ((~X[4]) >> 23); X[7] ^= X[6];
+ X[0] += X[7]; X[1] -= X[0] ^ ((~X[7]) << 19); X[2] ^= X[1];
+ X[3] += X[2]; X[4] -= X[3] ^ ((~X[2]) >> 23); X[5] ^= X[4];
+ X[6] += X[5]; X[7] -= X[6] ^ 0x0123456789ABCDEF;
+ }
+
+}
+
/*
* Tiger Compression Function
*/
@@ -114,19 +131,6 @@ void Tiger::pass(u64bit& A, u64bit& B, u64bit& C, u64bit X[8], byte mul)
}
/*
-* Tiger Mixing Function
-*/
-void Tiger::mix(u64bit X[8])
- {
- X[0] -= X[7] ^ 0xA5A5A5A5A5A5A5A5; X[1] ^= X[0];
- X[2] += X[1]; X[3] -= X[2] ^ ((~X[1]) << 19); X[4] ^= X[3];
- X[5] += X[4]; X[6] -= X[5] ^ ((~X[4]) >> 23); X[7] ^= X[6];
- X[0] += X[7]; X[1] -= X[0] ^ ((~X[7]) << 19); X[2] ^= X[1];
- X[3] += X[2]; X[4] -= X[3] ^ ((~X[2]) >> 23); X[5] ^= X[4];
- X[6] += X[5]; X[7] -= X[6] ^ 0x0123456789ABCDEF;
- }
-
-/*
* Clear memory of sensitive data
*/
void Tiger::clear()
diff --git a/src/hash/tiger/tiger.h b/src/hash/tiger/tiger.h
index 86ddcd270..20dcf99ff 100644
--- a/src/hash/tiger/tiger.h
+++ b/src/hash/tiger/tiger.h
@@ -27,7 +27,6 @@ class BOTAN_DLL Tiger : public MDx_HashFunction
void copy_out(byte[]);
static void pass(u64bit&, u64bit&, u64bit&, u64bit[8], byte);
- static void mix(u64bit[8]);
static const u64bit SBOX1[256];
static const u64bit SBOX2[256];
diff --git a/src/utils/bswap.h b/src/utils/bswap.h
index cceeda4f3..fcb0fa7ea 100644
--- a/src/utils/bswap.h
+++ b/src/utils/bswap.h
@@ -16,10 +16,6 @@
#include <emmintrin.h>
#endif
-#if defined(BOTAN_TARGET_CPU_HAS_SSSE3)
- #include <tmmintrin.h>
-#endif
-
namespace Botan {
/*
@@ -82,23 +78,7 @@ inline void bswap_4(T x[4])
x[3] = reverse_bytes(x[3]);
}
-#if defined(BOTAN_TARGET_CPU_HAS_SSSE3)
-
-template<>
-inline void bswap_4(u32bit x[4])
- {
- const __m128i bswap_mask = _mm_set_epi8(
- 12, 13, 14, 15,
- 8, 9, 10, 11,
- 4, 5, 6, 7,
- 0, 1, 2, 3);
-
- __m128i T = _mm_loadu_si128((const __m128i*)x);
- T = _mm_shuffle_epi8(T, bswap_mask);
- _mm_storeu_si128((__m128i*)x, T);
- }
-
-#elif defined(BOTAN_TARGET_CPU_HAS_SSE2)
+#if defined(BOTAN_TARGET_CPU_HAS_SSE2)
template<>
inline void bswap_4(u32bit x[4])