aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-08-29 11:53:06 -0400
committerJack Lloyd <[email protected]>2015-08-29 11:53:06 -0400
commit3103f299dfd9517a4ef3c40358c1a4cad38b7305 (patch)
treed3cb4309c78cfc0948315970ca3c827bc356c1ef /src/lib/block
parente4962bebbc687e93e47d35339b6a2242aefee51e (diff)
Reverse the algorithm priority ordering
Previously 0 was the highest priority and 255 was the lowest. But this is really quite confusing, instead treat 0 as lowest and 255 as highest so normal integer intuitions apply.
Diffstat (limited to 'src/lib/block')
-rw-r--r--src/lib/block/aes_ni/aes_ni.cpp6
-rw-r--r--src/lib/block/aes_ssse3/aes_ssse3.cpp9
-rw-r--r--src/lib/block/idea_sse2/idea_sse2.cpp3
-rw-r--r--src/lib/block/noekeon_simd/noekeon_simd.cpp3
-rw-r--r--src/lib/block/serpent_simd/serp_simd.cpp3
-rw-r--r--src/lib/block/threefish_avx2/threefish_avx2.cpp3
-rw-r--r--src/lib/block/xtea_simd/xtea_simd.cpp3
7 files changed, 19 insertions, 11 deletions
diff --git a/src/lib/block/aes_ni/aes_ni.cpp b/src/lib/block/aes_ni/aes_ni.cpp
index 20aa63c54..29e729da4 100644
--- a/src/lib/block/aes_ni/aes_ni.cpp
+++ b/src/lib/block/aes_ni/aes_ni.cpp
@@ -12,9 +12,9 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_aes_ni(), AES_128_NI, "AES-128", "aes_ni", 16);
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_aes_ni(), AES_192_NI, "AES-192", "aes_ni", 16);
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_aes_ni(), AES_256_NI, "AES-256", "aes_ni", 16);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_aes_ni(), AES_128_NI, "AES-128", "aes_ni", 200);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_aes_ni(), AES_192_NI, "AES-192", "aes_ni", 200);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_aes_ni(), AES_256_NI, "AES-256", "aes_ni", 200);
namespace {
diff --git a/src/lib/block/aes_ssse3/aes_ssse3.cpp b/src/lib/block/aes_ssse3/aes_ssse3.cpp
index f0d506b6e..50acd7668 100644
--- a/src/lib/block/aes_ssse3/aes_ssse3.cpp
+++ b/src/lib/block/aes_ssse3/aes_ssse3.cpp
@@ -17,9 +17,12 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_ssse3(), AES_128_SSSE3, "AES-128", "ssse3", 64);
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_ssse3(), AES_192_SSSE3, "AES-192", "ssse3", 64);
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_ssse3(), AES_256_SSSE3, "AES-256", "ssse3", 64);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_ssse3(), AES_128_SSSE3, "AES-128",
+ "ssse3", BOTAN_SIMD_ALGORITHM_PRIO);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_ssse3(), AES_192_SSSE3, "AES-192",
+ "ssse3", BOTAN_SIMD_ALGORITHM_PRIO);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_ssse3(), AES_256_SSSE3, "AES-256",
+ "ssse3", BOTAN_SIMD_ALGORITHM_PRIO);
namespace {
diff --git a/src/lib/block/idea_sse2/idea_sse2.cpp b/src/lib/block/idea_sse2/idea_sse2.cpp
index af7e2182d..8549d74d7 100644
--- a/src/lib/block/idea_sse2/idea_sse2.cpp
+++ b/src/lib/block/idea_sse2/idea_sse2.cpp
@@ -12,7 +12,8 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_sse2(), IDEA_SSE2, "IDEA", "sse2", 64);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_sse2(), IDEA_SSE2, "IDEA",
+ "sse2", BOTAN_SIMD_ALGORITHM_PRIO);
namespace {
diff --git a/src/lib/block/noekeon_simd/noekeon_simd.cpp b/src/lib/block/noekeon_simd/noekeon_simd.cpp
index a5d757d3c..a51c6bc8f 100644
--- a/src/lib/block/noekeon_simd/noekeon_simd.cpp
+++ b/src/lib/block/noekeon_simd/noekeon_simd.cpp
@@ -11,7 +11,8 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), Noekeon_SIMD, "Noekeon", "simd32", 64);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), Noekeon_SIMD, "Noekeon",
+ "simd32", BOTAN_SIMD_ALGORITHM_PRIO);
/*
* Noekeon's Theta Operation
diff --git a/src/lib/block/serpent_simd/serp_simd.cpp b/src/lib/block/serpent_simd/serp_simd.cpp
index 7b957598f..56747dd16 100644
--- a/src/lib/block/serpent_simd/serp_simd.cpp
+++ b/src/lib/block/serpent_simd/serp_simd.cpp
@@ -12,7 +12,8 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), Serpent_SIMD, "Serpent", "simd32", 64);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), Serpent_SIMD, "Serpent",
+ "simd32", BOTAN_SIMD_ALGORITHM_PRIO);
namespace {
diff --git a/src/lib/block/threefish_avx2/threefish_avx2.cpp b/src/lib/block/threefish_avx2/threefish_avx2.cpp
index e17146162..435c75dbf 100644
--- a/src/lib/block/threefish_avx2/threefish_avx2.cpp
+++ b/src/lib/block/threefish_avx2/threefish_avx2.cpp
@@ -12,7 +12,8 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_avx2(), Threefish_512_AVX2, "Threefish-512", "avx2", 64);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(CPUID::has_avx2(), Threefish_512_AVX2, "Threefish-512",
+ "avx2", BOTAN_SIMD_ALGORITHM_PRIO);
namespace {
diff --git a/src/lib/block/xtea_simd/xtea_simd.cpp b/src/lib/block/xtea_simd/xtea_simd.cpp
index ffd2eb560..a9984ce23 100644
--- a/src/lib/block/xtea_simd/xtea_simd.cpp
+++ b/src/lib/block/xtea_simd/xtea_simd.cpp
@@ -11,7 +11,8 @@
namespace Botan {
-BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), XTEA_SIMD, "XTEA", "simd32", 64);
+BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(SIMD_32::enabled(), XTEA_SIMD, "XTEA",
+ "simd32", BOTAN_SIMD_ALGORITHM_PRIO);
namespace {