aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash
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/hash
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/hash')
-rw-r--r--src/hash/bmw/bmw_512.cpp4
-rw-r--r--src/hash/fork256/fork256.cpp4
-rw-r--r--src/hash/gost_3411/gost_3411.cpp4
-rw-r--r--src/hash/has160/has160.cpp4
-rw-r--r--src/hash/md4/md4.cpp4
-rw-r--r--src/hash/md4_ia32/md4_ia32.cpp2
-rw-r--r--src/hash/md5/md5.cpp4
-rw-r--r--src/hash/md5_ia32/md5_ia32.cpp2
-rw-r--r--src/hash/mdx_hash/mdx_hash.cpp2
-rw-r--r--src/hash/rmd128/rmd128.cpp4
-rw-r--r--src/hash/rmd160/rmd160.cpp4
-rw-r--r--src/hash/sha1/sha160.cpp4
-rw-r--r--src/hash/sha1_ia32/sha1_ia32.cpp2
-rw-r--r--src/hash/sha1_sse2/sha1_sse2.cpp2
-rw-r--r--src/hash/sha2/sha2_32.cpp4
-rw-r--r--src/hash/sha2/sha2_64.cpp4
-rw-r--r--src/hash/skein/skein_512.cpp3
-rw-r--r--src/hash/tiger/tiger.cpp2
-rw-r--r--src/hash/whirlpool/whrlpool.cpp2
19 files changed, 31 insertions, 30 deletions
diff --git a/src/hash/bmw/bmw_512.cpp b/src/hash/bmw/bmw_512.cpp
index 61c20d769..5ccb09579 100644
--- a/src/hash/bmw/bmw_512.cpp
+++ b/src/hash/bmw/bmw_512.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/bmw_512.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/hash/fork256/fork256.cpp b/src/hash/fork256/fork256.cpp
index 6e6e44fb8..bd85dfd7c 100644
--- a/src/hash/fork256/fork256.cpp
+++ b/src/hash/fork256/fork256.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/fork256.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/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp
index 6de3c9d52..01d8a0d46 100644
--- a/src/hash/gost_3411/gost_3411.cpp
+++ b/src/hash/gost_3411/gost_3411.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/gost_3411.h>
-#include <botan/internal/loadstor.h>
-#include <botan/internal/rotate.h>
+#include <botan/loadstor.h>
+#include <botan/rotate.h>
#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp
index 006e8f142..d245a0249 100644
--- a/src/hash/has160/has160.cpp
+++ b/src/hash/has160/has160.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/has160.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/hash/md4/md4.cpp b/src/hash/md4/md4.cpp
index 5713a17b2..f573dae25 100644
--- a/src/hash/md4/md4.cpp
+++ b/src/hash/md4/md4.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/md4.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/hash/md4_ia32/md4_ia32.cpp b/src/hash/md4_ia32/md4_ia32.cpp
index cdaffb62e..12fe71da4 100644
--- a/src/hash/md4_ia32/md4_ia32.cpp
+++ b/src/hash/md4_ia32/md4_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/md4_ia32.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp
index 4714603d3..8c1e5a8e1 100644
--- a/src/hash/md5/md5.cpp
+++ b/src/hash/md5/md5.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/md5.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/hash/md5_ia32/md5_ia32.cpp b/src/hash/md5_ia32/md5_ia32.cpp
index 5681a2763..443569b3b 100644
--- a/src/hash/md5_ia32/md5_ia32.cpp
+++ b/src/hash/md5_ia32/md5_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/md5_ia32.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/hash/mdx_hash/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp
index cc03d0319..28402c2c5 100644
--- a/src/hash/mdx_hash/mdx_hash.cpp
+++ b/src/hash/mdx_hash/mdx_hash.cpp
@@ -7,7 +7,7 @@
#include <botan/mdx_hash.h>
#include <botan/exceptn.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp
index f86addda4..51e416eb1 100644
--- a/src/hash/rmd128/rmd128.cpp
+++ b/src/hash/rmd128/rmd128.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rmd128.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/hash/rmd160/rmd160.cpp b/src/hash/rmd160/rmd160.cpp
index e1d6a8dc5..5237f1e12 100644
--- a/src/hash/rmd160/rmd160.cpp
+++ b/src/hash/rmd160/rmd160.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rmd160.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/hash/sha1/sha160.cpp b/src/hash/sha1/sha160.cpp
index 5666d8fa5..ff44593f6 100644
--- a/src/hash/sha1/sha160.cpp
+++ b/src/hash/sha1/sha160.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/sha160.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/hash/sha1_ia32/sha1_ia32.cpp b/src/hash/sha1_ia32/sha1_ia32.cpp
index a8f7f7b75..0fa0b6bf2 100644
--- a/src/hash/sha1_ia32/sha1_ia32.cpp
+++ b/src/hash/sha1_ia32/sha1_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/sha1_ia32.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {
diff --git a/src/hash/sha1_sse2/sha1_sse2.cpp b/src/hash/sha1_sse2/sha1_sse2.cpp
index 89ad7b003..9267689e7 100644
--- a/src/hash/sha1_sse2/sha1_sse2.cpp
+++ b/src/hash/sha1_sse2/sha1_sse2.cpp
@@ -9,7 +9,7 @@
*/
#include <botan/sha1_sse2.h>
-#include <botan/internal/rotate.h>
+#include <botan/rotate.h>
#include <emmintrin.h>
namespace Botan {
diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp
index d9d69e4a9..91375df04 100644
--- a/src/hash/sha2/sha2_32.cpp
+++ b/src/hash/sha2/sha2_32.cpp
@@ -7,8 +7,8 @@
*/
#include <botan/sha2_32.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/hash/sha2/sha2_64.cpp b/src/hash/sha2/sha2_64.cpp
index 9815a6e19..3e7c0e228 100644
--- a/src/hash/sha2/sha2_64.cpp
+++ b/src/hash/sha2/sha2_64.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/sha2_64.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/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp
index 1d683c3cf..2c6aa121c 100644
--- a/src/hash/skein/skein_512.cpp
+++ b/src/hash/skein/skein_512.cpp
@@ -6,9 +6,10 @@
*/
#include <botan/skein_512.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
#include <botan/parsing.h>
#include <botan/exceptn.h>
+#include <botan/rotate.h>
#include <algorithm>
namespace Botan {
diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp
index 5a1d21847..4f4d4dc83 100644
--- a/src/hash/tiger/tiger.cpp
+++ b/src/hash/tiger/tiger.cpp
@@ -7,7 +7,7 @@
#include <botan/tiger.h>
#include <botan/exceptn.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/hash/whirlpool/whrlpool.cpp b/src/hash/whirlpool/whrlpool.cpp
index c9d520776..06755fe77 100644
--- a/src/hash/whirlpool/whrlpool.cpp
+++ b/src/hash/whirlpool/whrlpool.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/whrlpool.h>
-#include <botan/internal/loadstor.h>
+#include <botan/loadstor.h>
namespace Botan {