From 8c4300a36c15f79c89d898e1c47f3967cb9f2070 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 18 Feb 2018 11:57:26 -0500 Subject: [PATCH] Remove variable block size in datatest.cpp (GH #535) --- datatest.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/datatest.cpp b/datatest.cpp index 8f33b668..cfabad40 100644 --- a/datatest.cpp +++ b/datatest.cpp @@ -401,9 +401,6 @@ void TestSymmetricCipher(TestData &v, const NameValuePairs &overrideParameters) lastName = name; } - // Most block ciphers don't specify BlockSize. Kalyna and Threefish use it. - int blockSize = pairs.GetIntValueWithDefault(Name::BlockSize(), 0); - // Most block ciphers don't specify BlockPaddingScheme. Kalyna uses it in test vectors. // 0 is NoPadding, 1 is ZerosPadding, 2 is PkcsPadding, 3 is OneAndZerosPadding, etc // Note: The machinery is wired such that paddingScheme is effectively latched. An @@ -411,7 +408,7 @@ void TestSymmetricCipher(TestData &v, const NameValuePairs &overrideParameters) int paddingScheme = pairs.GetIntValueWithDefault(Name::BlockPaddingScheme(), 0); ConstByteArrayParameter iv; - if (pairs.GetValue(Name::IV(), iv) && iv.size() != encryptor->IVSize() && (int)iv.size() != blockSize) + if (pairs.GetValue(Name::IV(), iv) && iv.size() != encryptor->IVSize()) SignalTestFailure(); if (test == "Resync")