summaryrefslogtreecommitdiff
path: root/datatest.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-29 06:55:19 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-29 06:55:19 -0500
commit92436b9f9b8f9553ec385de0366fef302ee81af0 (patch)
treebb1e0788ab024495a8f4d363b852e2f5f37b24e2 /datatest.cpp
parentf86c6124a8e094309dbf58d3e9aae96e4aca0bb2 (diff)
downloadcryptopp-git-92436b9f9b8f9553ec385de0366fef302ee81af0.tar.gz
Re-enable Salsa20 ASM (GH #543)
We are fairly certain this is a false positive due to glibc's __memcmp_sse4_1.
Diffstat (limited to 'datatest.cpp')
-rw-r--r--datatest.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/datatest.cpp b/datatest.cpp
index 2f9bcb5f..8f33b668 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -116,12 +116,8 @@ void PutDecodedDatumInto(const TestData &data, const char *name, BufferedTransfo
s1 = s1.substr(s1.find(' ')+1);
}
- // Convert endian order. Use it with 64-bit words like this:
- // Key: word64 BC2560EFC6BBA2B1 E3361F162238EB40 FB8631EE0ABBD175 7B9479D4C5479ED1
- // BC2560EFC6BBA2B1 will be processed into B1A2BBC6EF6025BC.
- // or:
- // Key: word32 BC2560EF E3361F16 FB8631EE 7B9479D4
- // BC2560EF will be processed into EF6025BC.
+ // Convert word32 or word64 to little endian order. Some algorithm test vectors are
+ // presented in the format. We probably should have named them word32le and word64le.
if (s1.length() >= 6 && (s1.substr(0,6) == "word32" || s1.substr(0,6) == "word64"))
{
std::istringstream iss(s1.substr(6));
@@ -489,16 +485,7 @@ void TestSymmetricCipher(TestData &v, const NameValuePairs &overrideParameters)
static_cast<BlockPaddingSchemeDef::BlockPaddingScheme>(paddingScheme));
RandomizedTransfer(StringStore(plaintext).Ref(), encFilter, true);
encFilter.MessageEnd();
- /*{
- std::string z;
- encryptor->Seek(seek);
- StringSource ss(plaintext, false, new StreamTransformationFilter(*encryptor, new StringSink(z),
- static_cast<BlockPaddingSchemeDef::BlockPaddingScheme>(paddingScheme)));
- while (ss.Pump(64)) {}
- ss.PumpAll();
- for (int i=0; i<z.length(); i++)
- CRYPTOPP_ASSERT(encrypted[i] == z[i]);
- }*/
+
if (test != "EncryptXorDigest")
ciphertext = GetDecodedDatum(v, "Ciphertext");
else