aboutsummaryrefslogtreecommitdiffstats
path: root/src/block
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-21 13:51:05 +0000
committerlloyd <[email protected]>2009-12-21 13:51:05 +0000
commit75f32d61c6a78e4e63cfadd084730f20b5896493 (patch)
tree4a52d3009f012ec5761f1c1218e18efbe07eef0b /src/block
parentf3f36611db8c3f6c67c818d454973a0165b0fcf2 (diff)
Un-internal loadstor.h (and its header deps, rotate.h and
bswap.h); too many external apps rely on loadstor.h existing. Define 64-bit generic bswap in terms of 32-bit bswap, since it's not much slower if 32-bit is also generic, and much faster if it's not. This may be quite helpful on 32-bit x86 in particular. Change formulation of generic 32-bit bswap. It may be faster or slower depending on the CPU, especially the latency and throuput of rotate instructions, but should be faster on an ideally superscalar processor with rotate instructions (ie, what I expect future CPUs to look more like).
Diffstat (limited to 'src/block')
-rw-r--r--src/block/aes/aes.cpp3
-rw-r--r--src/block/aes_intel/aes_intel.cpp2
-rw-r--r--src/block/blowfish/blowfish.cpp2
-rw-r--r--src/block/cast/cast128.cpp4
-rw-r--r--src/block/cast/cast256.cpp4
-rw-r--r--src/block/des/des.cpp3
-rw-r--r--src/block/gost_28147/gost_28147.cpp3
-rw-r--r--src/block/idea/idea.cpp2
-rw-r--r--src/block/kasumi/kasumi.cpp4
-rw-r--r--src/block/mars/mars.cpp4
-rw-r--r--src/block/misty1/misty1.cpp2
-rw-r--r--src/block/noekeon/noekeon.cpp4
-rw-r--r--src/block/rc2/rc2.cpp4
-rw-r--r--src/block/rc5/rc5.cpp4
-rw-r--r--src/block/rc6/rc6.cpp4
-rw-r--r--src/block/safer/safer_sk.cpp4
-rw-r--r--src/block/seed/seed.cpp2
-rw-r--r--src/block/serpent/serpent.cpp4
-rw-r--r--src/block/serpent_ia32/serp_ia32.cpp2
-rw-r--r--src/block/serpent_simd/serp_simd.cpp2
-rw-r--r--src/block/skipjack/skipjack.cpp2
-rw-r--r--src/block/square/square.cpp4
-rw-r--r--src/block/tea/tea.cpp2
-rw-r--r--src/block/twofish/twofish.cpp4
-rw-r--r--src/block/xtea/xtea.cpp2
-rw-r--r--src/block/xtea_simd/xtea_simd.cpp2
26 files changed, 41 insertions, 38 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp
index d972d921a..721c4ac75 100644
--- a/src/block/aes/aes.cpp
+++ b/src/block/aes/aes.cpp
@@ -6,7 +6,8 @@
*/
#include <botan/aes.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/aes_intel/aes_intel.cpp b/src/block/aes_intel/aes_intel.cpp
index 5ccf3fc5d..3d3683d7d 100644
--- a/src/block/aes_intel/aes_intel.cpp
+++ b/src/block/aes_intel/aes_intel.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/aes_intel.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
#include <wmmintrin.h>
namespace Botan {
diff --git a/src/block/blowfish/blowfish.cpp b/src/block/blowfish/blowfish.cpp
index 6a00caa90..d0b182a84 100644
--- a/src/block/blowfish/blowfish.cpp
+++ b/src/block/blowfish/blowfish.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/blowfish.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/cast/cast128.cpp b/src/block/cast/cast128.cpp
index 2d876d31e..887dcf994 100644
--- a/src/block/cast/cast128.cpp
+++ b/src/block/cast/cast128.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/cast128.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/cast/cast256.cpp b/src/block/cast/cast256.cpp
index 832c170aa..7a4a4e805 100644
--- a/src/block/cast/cast256.cpp
+++ b/src/block/cast/cast256.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/cast256.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/des/des.cpp b/src/block/des/des.cpp
index 3bc970735..bbe564827 100644
--- a/src/block/des/des.cpp
+++ b/src/block/des/des.cpp
@@ -6,7 +6,8 @@
*/
#include <botan/des.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/gost_28147/gost_28147.cpp b/src/block/gost_28147/gost_28147.cpp
index 8340b8ccc..2dfce0473 100644
--- a/src/block/gost_28147/gost_28147.cpp
+++ b/src/block/gost_28147/gost_28147.cpp
@@ -6,7 +6,8 @@
*/
#include <botan/gost_28147.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/idea/idea.cpp b/src/block/idea/idea.cpp
index 84c401475..fb5fe83f1 100644
--- a/src/block/idea/idea.cpp
+++ b/src/block/idea/idea.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/idea.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/kasumi/kasumi.cpp b/src/block/kasumi/kasumi.cpp
index e22948293..dff6db13c 100644
--- a/src/block/kasumi/kasumi.cpp
+++ b/src/block/kasumi/kasumi.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/kasumi.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/mars/mars.cpp b/src/block/mars/mars.cpp
index 526073cef..6b73ea054 100644
--- a/src/block/mars/mars.cpp
+++ b/src/block/mars/mars.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/mars.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/misty1/misty1.cpp b/src/block/misty1/misty1.cpp
index fcd647a76..8a92824cc 100644
--- a/src/block/misty1/misty1.cpp
+++ b/src/block/misty1/misty1.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/misty1.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/block/noekeon/noekeon.cpp b/src/block/noekeon/noekeon.cpp
index 74a485773..0bfce1882 100644
--- a/src/block/noekeon/noekeon.cpp
+++ b/src/block/noekeon/noekeon.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/noekeon.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/rc2/rc2.cpp b/src/block/rc2/rc2.cpp
index 7fd1ed80e..b5e4a7d50 100644
--- a/src/block/rc2/rc2.cpp
+++ b/src/block/rc2/rc2.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rc2.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/rc5/rc5.cpp b/src/block/rc5/rc5.cpp
index c0f555103..0bd596b10 100644
--- a/src/block/rc5/rc5.cpp
+++ b/src/block/rc5/rc5.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rc5.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
#include <botan/parsing.h>
#include <algorithm>
diff --git a/src/block/rc6/rc6.cpp b/src/block/rc6/rc6.cpp
index 5c2aba60a..8bda62259 100644
--- a/src/block/rc6/rc6.cpp
+++ b/src/block/rc6/rc6.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rc6.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
#include <algorithm>
namespace Botan {
diff --git a/src/block/safer/safer_sk.cpp b/src/block/safer/safer_sk.cpp
index 540efde79..eb5c22fc9 100644
--- a/src/block/safer/safer_sk.cpp
+++ b/src/block/safer/safer_sk.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/safer_sk.h>
-#include <botan/internal/rotate.h>
+#include <botan/rotate.h>
#include <botan/parsing.h>
-#include <botan/internal/rotate.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/seed/seed.cpp b/src/block/seed/seed.cpp
index b674fce95..378be16e4 100644
--- a/src/block/seed/seed.cpp
+++ b/src/block/seed/seed.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/seed.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/serpent/serpent.cpp b/src/block/serpent/serpent.cpp
index d08e0c384..e16afc89c 100644
--- a/src/block/serpent/serpent.cpp
+++ b/src/block/serpent/serpent.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/serpent.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/serpent_ia32/serp_ia32.cpp b/src/block/serpent_ia32/serp_ia32.cpp
index 3b90f4950..721584b18 100644
--- a/src/block/serpent_ia32/serp_ia32.cpp
+++ b/src/block/serpent_ia32/serp_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/serp_ia32.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/serpent_simd/serp_simd.cpp b/src/block/serpent_simd/serp_simd.cpp
index 3a42db55f..0a535c9a0 100644
--- a/src/block/serpent_simd/serp_simd.cpp
+++ b/src/block/serpent_simd/serp_simd.cpp
@@ -8,7 +8,7 @@
#include <botan/serp_simd.h>
#include <botan/internal/serp_simd_sbox.h>
#include <botan/internal/simd_32.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/skipjack/skipjack.cpp b/src/block/skipjack/skipjack.cpp
index b1765d67a..b23d1e160 100644
--- a/src/block/skipjack/skipjack.cpp
+++ b/src/block/skipjack/skipjack.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/skipjack.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/square/square.cpp b/src/block/square/square.cpp
index a64e2538e..892568655 100644
--- a/src/block/square/square.cpp
+++ b/src/block/square/square.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/square.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/tea/tea.cpp b/src/block/tea/tea.cpp
index 617c9505a..de30858da 100644
--- a/src/block/tea/tea.cpp
+++ b/src/block/tea/tea.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/tea.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/twofish/twofish.cpp b/src/block/twofish/twofish.cpp
index 1969b615b..3136837aa 100644
--- a/src/block/twofish/twofish.cpp
+++ b/src/block/twofish/twofish.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/twofish.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
namespace Botan {
diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp
index 2172d63b8..fc14c0a57 100644
--- a/src/block/xtea/xtea.cpp
+++ b/src/block/xtea/xtea.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/xtea.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/block/xtea_simd/xtea_simd.cpp b/src/block/xtea_simd/xtea_simd.cpp
index a8d1fe810..264d4f949 100644
--- a/src/block/xtea_simd/xtea_simd.cpp
+++ b/src/block/xtea_simd/xtea_simd.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/xtea_simd.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
#include <botan/internal/simd_32.h>
namespace Botan {