aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-01-22 11:17:34 -0500
committerJack Lloyd <[email protected]>2019-01-22 11:17:34 -0500
commit293a2b902037d4afdeddce080df9d965fa7f1116 (patch)
tree6eae8b91cc68fa316e0a141e21ae849e0f53a144 /src
parentaf3611850db10cb1a7cffabbe1f9692c7aeb6f85 (diff)
Remove some unnecessary asserts
Now this is checked at the higher level
Diffstat (limited to 'src')
-rw-r--r--src/lib/block/aes/aes_armv8/aes_armv8.cpp11
-rw-r--r--src/lib/block/aes/aes_ni/aes_ni.cpp12
-rw-r--r--src/lib/block/aes/aes_power8/aes_power8.cpp11
3 files changed, 0 insertions, 34 deletions
diff --git a/src/lib/block/aes/aes_armv8/aes_armv8.cpp b/src/lib/block/aes/aes_armv8/aes_armv8.cpp
index 8a332ceaf..f4261954b 100644
--- a/src/lib/block/aes/aes_armv8/aes_armv8.cpp
+++ b/src/lib/block/aes/aes_armv8/aes_armv8.cpp
@@ -56,8 +56,6 @@ namespace Botan {
BOTAN_FUNC_ISA("+crypto")
void AES_128::armv8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const uint8_t *skey = reinterpret_cast<const uint8_t*>(m_EK.data());
const uint8_t *mkey = reinterpret_cast<const uint8_t*>(m_ME.data());
@@ -124,8 +122,6 @@ void AES_128::armv8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("+crypto")
void AES_128::armv8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_DK.empty() == false, "Key was set");
-
const uint8_t *skey = reinterpret_cast<const uint8_t*>(m_DK.data());
const uint8_t *mkey = reinterpret_cast<const uint8_t*>(m_MD.data());
@@ -192,8 +188,6 @@ void AES_128::armv8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("+crypto")
void AES_192::armv8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const uint8_t *skey = reinterpret_cast<const uint8_t*>(m_EK.data());
const uint8_t *mkey = reinterpret_cast<const uint8_t*>(m_ME.data());
@@ -266,7 +260,6 @@ void AES_192::armv8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("+crypto")
void AES_192::armv8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_DK.empty() == false, "Key was set");
const uint8_t *skey = reinterpret_cast<const uint8_t*>(m_DK.data());
const uint8_t *mkey = reinterpret_cast<const uint8_t*>(m_MD.data());
@@ -339,8 +332,6 @@ void AES_192::armv8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("+crypto")
void AES_256::armv8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const uint8_t *skey = reinterpret_cast<const uint8_t*>(m_EK.data());
const uint8_t *mkey = reinterpret_cast<const uint8_t*>(m_ME.data());
@@ -419,8 +410,6 @@ void AES_256::armv8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("+crypto")
void AES_256::armv8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_DK.empty() == false, "Key was set");
-
const uint8_t *skey = reinterpret_cast<const uint8_t*>(m_DK.data());
const uint8_t *mkey = reinterpret_cast<const uint8_t*>(m_MD.data());
diff --git a/src/lib/block/aes/aes_ni/aes_ni.cpp b/src/lib/block/aes/aes_ni/aes_ni.cpp
index 9f1ba8fcc..0160bc1ee 100644
--- a/src/lib/block/aes/aes_ni/aes_ni.cpp
+++ b/src/lib/block/aes/aes_ni/aes_ni.cpp
@@ -109,8 +109,6 @@ __m128i aes_256_key_expansion(__m128i key, __m128i key2)
BOTAN_FUNC_ISA("ssse3,aes")
void AES_128::aesni_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
@@ -188,8 +186,6 @@ void AES_128::aesni_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("ssse3,aes")
void AES_128::aesni_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_DK.empty() == false, "Key was set");
-
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
@@ -320,8 +316,6 @@ void AES_128::aesni_key_schedule(const uint8_t key[], size_t)
BOTAN_FUNC_ISA("ssse3,aes")
void AES_192::aesni_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
@@ -405,8 +399,6 @@ void AES_192::aesni_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("ssse3,aes")
void AES_192::aesni_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_DK.empty() == false, "Key was set");
-
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
@@ -540,8 +532,6 @@ void AES_192::aesni_key_schedule(const uint8_t key[], size_t)
BOTAN_FUNC_ISA("ssse3,aes")
void AES_256::aesni_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
@@ -631,8 +621,6 @@ void AES_256::aesni_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("ssse3,aes")
void AES_256::aesni_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_DK.empty() == false, "Key was set");
-
const __m128i* in_mm = reinterpret_cast<const __m128i*>(in);
__m128i* out_mm = reinterpret_cast<__m128i*>(out);
diff --git a/src/lib/block/aes/aes_power8/aes_power8.cpp b/src/lib/block/aes/aes_power8/aes_power8.cpp
index 98520a13c..e90a51131 100644
--- a/src/lib/block/aes/aes_power8/aes_power8.cpp
+++ b/src/lib/block/aes/aes_power8/aes_power8.cpp
@@ -65,8 +65,6 @@ void StoreBlock(const __vector unsigned long long src, uint8_t* dest)
BOTAN_FUNC_ISA("crypto")
void AES_128::power8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __vector unsigned long long K0 = LoadKey(&m_EK[0]);
const __vector unsigned long long K1 = LoadKey(&m_EK[4]);
const __vector unsigned long long K2 = LoadKey(&m_EK[8]);
@@ -105,8 +103,6 @@ void AES_128::power8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("crypto")
void AES_128::power8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __vector unsigned long long K0 = LoadBlock(m_ME.data());
const __vector unsigned long long K1 = LoadKey(&m_EK[36]);
const __vector unsigned long long K2 = LoadKey(&m_EK[32]);
@@ -145,8 +141,6 @@ void AES_128::power8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("crypto")
void AES_192::power8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __vector unsigned long long K0 = LoadKey(&m_EK[0]);
const __vector unsigned long long K1 = LoadKey(&m_EK[4]);
const __vector unsigned long long K2 = LoadKey(&m_EK[8]);
@@ -189,8 +183,6 @@ void AES_192::power8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("crypto")
void AES_192::power8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __vector unsigned long long K0 = LoadBlock(m_ME.data());
const __vector unsigned long long K1 = LoadKey(&m_EK[44]);
const __vector unsigned long long K2 = LoadKey(&m_EK[40]);
@@ -233,7 +225,6 @@ void AES_192::power8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("crypto")
void AES_256::power8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
const __vector unsigned long long K0 = LoadKey(&m_EK[0]);
const __vector unsigned long long K1 = LoadKey(&m_EK[4]);
const __vector unsigned long long K2 = LoadKey(&m_EK[8]);
@@ -280,8 +271,6 @@ void AES_256::power8_encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks)
BOTAN_FUNC_ISA("crypto")
void AES_256::power8_decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const
{
- BOTAN_ASSERT(m_EK.empty() == false, "Key was set");
-
const __vector unsigned long long K0 = LoadBlock(m_ME.data());
const __vector unsigned long long K1 = LoadKey(&m_EK[52]);
const __vector unsigned long long K2 = LoadKey(&m_EK[48]);