diff options
-rw-r--r-- | doc/log.txt | 1 | ||||
-rw-r--r-- | src/algo_factory/prov_weight.cpp | 3 | ||||
-rw-r--r-- | src/engine/amd64_eng/amd64_engine.cpp | 27 | ||||
-rw-r--r-- | src/engine/amd64_eng/amd64_engine.h | 29 | ||||
-rw-r--r-- | src/engine/amd64_eng/info.txt | 11 | ||||
-rw-r--r-- | src/engine/asm_engine/asm_engine.cpp (renamed from src/engine/ia32_eng/ia32_engine.cpp) | 22 | ||||
-rw-r--r-- | src/engine/asm_engine/asm_engine.h (renamed from src/engine/ia32_eng/ia32_engine.h) | 8 | ||||
-rw-r--r-- | src/engine/asm_engine/info.txt (renamed from src/engine/ia32_eng/info.txt) | 6 | ||||
-rw-r--r-- | src/hash/sha1_amd64/info.txt | 2 | ||||
-rw-r--r-- | src/libstate/libstate.cpp | 16 | ||||
-rw-r--r-- | src/utils/asm_amd64/info.txt | 2 | ||||
-rw-r--r-- | src/utils/asm_ia32/info.txt | 2 |
12 files changed, 31 insertions, 98 deletions
diff --git a/doc/log.txt b/doc/log.txt index 4e3c00372..5487bb4fd 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -2,6 +2,7 @@ * 1.9.10-dev, ????-??-?? - Drop support for building with Python 2.4 - Fix benchmarking of block ciphers in ECB mode + - Consolidate the two x86 assembly engines - Rename S2K to PBKDF * 1.9.9, 2010-06-28 diff --git a/src/algo_factory/prov_weight.cpp b/src/algo_factory/prov_weight.cpp index 0ca588aa9..f9c9a9634 100644 --- a/src/algo_factory/prov_weight.cpp +++ b/src/algo_factory/prov_weight.cpp @@ -21,8 +21,7 @@ u32bit static_provider_weight(const std::string& prov_name) if(prov_name == "aes_isa") return 9; if(prov_name == "simd") return 8; - if(prov_name == "amd64") return 7; - if(prov_name == "ia32") return 6; + if(prov_name == "asm") return 7; if(prov_name == "core") return 5; diff --git a/src/engine/amd64_eng/amd64_engine.cpp b/src/engine/amd64_eng/amd64_engine.cpp deleted file mode 100644 index 262bd5809..000000000 --- a/src/engine/amd64_eng/amd64_engine.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* -* AMD64 Assembly Implementation Engine -* (C) 1999-2008 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#include <botan/internal/amd64_engine.h> - -#if defined(BOTAN_HAS_SHA1_AMD64) - #include <botan/sha1_amd64.h> -#endif - -namespace Botan { - -HashFunction* AMD64_Assembler_Engine::find_hash(const SCAN_Name& request, - Algorithm_Factory&) const - { -#if defined(BOTAN_HAS_SHA1_AMD64) - if(request.algo_name() == "SHA-160") - return new SHA_160_AMD64; -#endif - - return 0; - } - -} diff --git a/src/engine/amd64_eng/amd64_engine.h b/src/engine/amd64_eng/amd64_engine.h deleted file mode 100644 index dc3d4cefc..000000000 --- a/src/engine/amd64_eng/amd64_engine.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -* x86-64 Assembly Implementation Engines -* (C) 1999-2008 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_AMD64_ASM_ENGINE_H__ -#define BOTAN_AMD64_ASM_ENGINE_H__ - -#include <botan/engine.h> - -namespace Botan { - -/** -* Engine for implementations that are x86-64 specific -*/ -class AMD64_Assembler_Engine : public Engine - { - public: - std::string provider_name() const { return "amd64"; } - - HashFunction* find_hash(const SCAN_Name& reqeust, - Algorithm_Factory&) const; - }; - -} - -#endif diff --git a/src/engine/amd64_eng/info.txt b/src/engine/amd64_eng/info.txt deleted file mode 100644 index 089abd7ad..000000000 --- a/src/engine/amd64_eng/info.txt +++ /dev/null @@ -1,11 +0,0 @@ -define ENGINE_AMD64_ASSEMBLER - -load_on dep - -<header:internal> -amd64_engine.h -</header:internal> - -<source> -amd64_engine.cpp -</source> diff --git a/src/engine/ia32_eng/ia32_engine.cpp b/src/engine/asm_engine/asm_engine.cpp index eb7795888..463546036 100644 --- a/src/engine/ia32_eng/ia32_engine.cpp +++ b/src/engine/asm_engine/asm_engine.cpp @@ -1,11 +1,11 @@ /* * Assembly Implementation Engine -* (C) 1999-2007 Jack Lloyd +* (C) 1999-2010 Jack Lloyd * * Distributed under the terms of the Botan license */ -#include <botan/internal/ia32_engine.h> +#include <botan/internal/asm_engine.h> #if defined(BOTAN_HAS_SERPENT_IA32) #include <botan/serp_ia32.h> @@ -19,6 +19,10 @@ #include <botan/md5_ia32.h> #endif +#if defined(BOTAN_HAS_SHA1_AMD64) + #include <botan/sha1_amd64.h> +#endif + #if defined(BOTAN_HAS_SHA1_IA32) #include <botan/sha1_ia32.h> #endif @@ -26,8 +30,8 @@ namespace Botan { BlockCipher* -IA32_Assembler_Engine::find_block_cipher(const SCAN_Name& request, - Algorithm_Factory&) const +Assembler_Engine::find_block_cipher(const SCAN_Name& request, + Algorithm_Factory&) const { #if defined(BOTAN_HAS_SERPENT_IA32) if(request.algo_name() == "Serpent") @@ -38,8 +42,8 @@ IA32_Assembler_Engine::find_block_cipher(const SCAN_Name& request, } HashFunction* -IA32_Assembler_Engine::find_hash(const SCAN_Name& request, - Algorithm_Factory&) const +Assembler_Engine::find_hash(const SCAN_Name& request, + Algorithm_Factory&) const { #if defined(BOTAN_HAS_MD4_IA32) if(request.algo_name() == "MD4") @@ -51,10 +55,14 @@ IA32_Assembler_Engine::find_hash(const SCAN_Name& request, return new MD5_IA32; #endif -#if defined(BOTAN_HAS_SHA1_IA32) if(request.algo_name() == "SHA-160") + { +#if defined(BOTAN_HAS_SHA1_AMD64) + return new SHA_160_AMD64; +#elif defined(BOTAN_HAS_SHA1_IA32) return new SHA_160_IA32; #endif + } return 0; } diff --git a/src/engine/ia32_eng/ia32_engine.h b/src/engine/asm_engine/asm_engine.h index 6e0a8a5f4..e3e9a546c 100644 --- a/src/engine/ia32_eng/ia32_engine.h +++ b/src/engine/asm_engine/asm_engine.h @@ -1,6 +1,6 @@ /* -* IA-32 Assembly Implementation Engines -* (C) 1999-2008 Jack Lloyd +* Assembly Implementation Engine +* (C) 1999-2010 Jack Lloyd * * Distributed under the terms of the Botan license */ @@ -15,10 +15,10 @@ namespace Botan { /** * Engine for x86-32 specific implementations */ -class IA32_Assembler_Engine : public Engine +class Assembler_Engine : public Engine { public: - std::string provider_name() const { return "ia32"; } + std::string provider_name() const { return "asm"; } BlockCipher* find_block_cipher(const SCAN_Name&, Algorithm_Factory&) const; diff --git a/src/engine/ia32_eng/info.txt b/src/engine/asm_engine/info.txt index 258c64d1d..c2258d57b 100644 --- a/src/engine/ia32_eng/info.txt +++ b/src/engine/asm_engine/info.txt @@ -1,11 +1,11 @@ -define ENGINE_IA32_ASSEMBLER +define ENGINE_ASSEMBLER load_on dep <source> -ia32_engine.cpp +asm_engine.cpp </source> <header:internal> -ia32_engine.h +asm_engine.h </header:internal> diff --git a/src/hash/sha1_amd64/info.txt b/src/hash/sha1_amd64/info.txt index e54b032ca..8fdb7e2fc 100644 --- a/src/hash/sha1_amd64/info.txt +++ b/src/hash/sha1_amd64/info.txt @@ -20,7 +20,7 @@ solaris </os> <requires> -amd64_eng +asm_engine asm_amd64 sha1 </requires> diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index c7d2bb161..83fb31406 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -32,12 +32,8 @@ #include <botan/internal/mmap_mem.h> #endif -#if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER) - #include <botan/internal/ia32_engine.h> -#endif - -#if defined(BOTAN_HAS_ENGINE_AMD64_ASSEMBLER) - #include <botan/internal/amd64_engine.h> +#if defined(BOTAN_HAS_ENGINE_ASSEMBLER) + #include <botan/internal/asm_engine.h> #endif #if defined(BOTAN_HAS_ENGINE_AES_ISA) @@ -298,12 +294,8 @@ void Library_State::initialize(bool thread_safe) algorithm_factory().add_engine(new SIMD_Engine); #endif -#if defined(BOTAN_HAS_ENGINE_AMD64_ASSEMBLER) - algorithm_factory().add_engine(new AMD64_Assembler_Engine); -#endif - -#if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER) - algorithm_factory().add_engine(new IA32_Assembler_Engine); +#if defined(BOTAN_HAS_ENGINE_ASSEMBLER) + algorithm_factory().add_engine(new Assembler_Engine); #endif algorithm_factory().add_engine(new Default_Engine); diff --git a/src/utils/asm_amd64/info.txt b/src/utils/asm_amd64/info.txt index 93405e6ce..ac2d73958 100644 --- a/src/utils/asm_amd64/info.txt +++ b/src/utils/asm_amd64/info.txt @@ -14,5 +14,5 @@ icc </cc> <requires> -amd64_eng +asm_engine </requires> diff --git a/src/utils/asm_ia32/info.txt b/src/utils/asm_ia32/info.txt index d490124f4..094d02a75 100644 --- a/src/utils/asm_ia32/info.txt +++ b/src/utils/asm_ia32/info.txt @@ -14,5 +14,5 @@ icc </cc> <requires> -ia32_eng +asm_engine </requires> |