aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2011-10-09 19:51:16 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2011-10-14 23:04:29 +0100
commite394de7237dd35cb45471d324ff52a3ae190e4f9 (patch)
tree9d25ea09a67c41cb9eb0e7a039dc5c19955755e9
parentd73045dd1c1dd9c11e8a1ae6890137df9f9b3c7c (diff)
downloadpaludis-e394de7237dd35cb45471d324ff52a3ae190e4f9.tar.gz
paludis-e394de7237dd35cb45471d324ff52a3ae190e4f9.tar.xz
Add a SHA512 implementation
-rw-r--r--.gitignore1
-rw-r--r--NEWS2
-rw-r--r--paludis/util/files.m41
-rw-r--r--paludis/util/sha512.cc198
-rw-r--r--paludis/util/sha512.hh66
-rw-r--r--paludis/util/sha512_TEST.cc921
6 files changed, 1189 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 47f6365..6f35599 100644
--- a/.gitignore
+++ b/.gitignore
@@ -449,6 +449,7 @@ paludis-*.*.*.tar.bz2
/paludis/util/save_TEST
/paludis/util/sha1_TEST
/paludis/util/sha256_TEST
+/paludis/util/sha512_TEST
/paludis/util/simple_parser_TEST
/paludis/util/singleton_TEST
/paludis/util/stringify_TEST
diff --git a/NEWS b/NEWS
index 136e8ff..307819f 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ master:
* Manifest files for E repositories are now generated with the lines in the
same order as Portage.
+ * The SHA-512 algorithm is now supported for Manifest files.
+
0.68.0:
* Licence groups are now supported.
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index 219d7a4..8bdf56a 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -76,6 +76,7 @@ add(`sequence', `hh', `fwd', `impl', `cc')
add(`set', `hh', `fwd', `impl', `cc')
add(`sha1', `hh', `cc', `gtest')
add(`sha256', `hh', `cc', `gtest')
+add(`sha512', `hh', `cc', `gtest')
add(`simple_parser', `hh', `cc', `gtest', `fwd')
add(`singleton', `hh', `impl', `gtest')
add(`stringify', `hh', `gtest')
diff --git a/paludis/util/sha512.cc b/paludis/util/sha512.cc
new file mode 100644
index 0000000..caca597
--- /dev/null
+++ b/paludis/util/sha512.cc
@@ -0,0 +1,198 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2008, 2011 David Leverton
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/util/sha512.hh>
+#include <paludis/util/byte_swap.hh>
+#include <paludis/util/digest_registry.hh>
+#include <sstream>
+#include <istream>
+#include <iomanip>
+#include <limits>
+#include <algorithm>
+
+using namespace paludis;
+
+/*
+ * Implemented based upon the description in FIPS 180-3.
+ */
+
+namespace
+{
+ template <int n_>
+ inline uint64_t rotr(uint64_t x)
+ {
+ return (x >> n_) | (x << (64 - n_));
+ }
+
+ inline uint64_t ch(uint64_t x, uint64_t y, uint64_t z)
+ {
+ return (x & y) ^ (~x & z);
+ }
+
+ inline uint64_t maj(uint64_t x, uint64_t y, uint64_t z)
+ {
+ return (x & y) ^ (x & z) ^ (y & z);
+ }
+
+ inline uint64_t Sigma0(uint64_t x)
+ {
+ return rotr<28>(x) ^ rotr<34>(x) ^ rotr<39>(x);
+ }
+
+ inline uint64_t Sigma1(uint64_t x)
+ {
+ return rotr<14>(x) ^ rotr<18>(x) ^ rotr<41>(x);
+ }
+
+ inline uint64_t sigma0(uint64_t x)
+ {
+ return rotr<1>(x) ^ rotr<8>(x) ^ (x >> 7);
+ }
+
+ inline uint64_t sigma1(uint64_t x)
+ {
+ return rotr<19>(x) ^ rotr<61>(x) ^ (x >> 6);
+ }
+
+ uint64_t k[] = {
+ 0x428A2F98D728AE22ULL, 0x7137449123EF65CDULL, 0xB5C0FBCFEC4D3B2FULL, 0xE9B5DBA58189DBBCULL,
+ 0x3956C25BF348B538ULL, 0x59F111F1B605D019ULL, 0x923F82A4AF194F9BULL, 0xAB1C5ED5DA6D8118ULL,
+ 0xD807AA98A3030242ULL, 0x12835B0145706FBEULL, 0x243185BE4EE4B28CULL, 0x550C7DC3D5FFB4E2ULL,
+ 0x72BE5D74F27B896FULL, 0x80DEB1FE3B1696B1ULL, 0x9BDC06A725C71235ULL, 0xC19BF174CF692694ULL,
+ 0xE49B69C19EF14AD2ULL, 0xEFBE4786384F25E3ULL, 0x0FC19DC68B8CD5B5ULL, 0x240CA1CC77AC9C65ULL,
+ 0x2DE92C6F592B0275ULL, 0x4A7484AA6EA6E483ULL, 0x5CB0A9DCBD41FBD4ULL, 0x76F988DA831153B5ULL,
+ 0x983E5152EE66DFABULL, 0xA831C66D2DB43210ULL, 0xB00327C898FB213FULL, 0xBF597FC7BEEF0EE4ULL,
+ 0xC6E00BF33DA88FC2ULL, 0xD5A79147930AA725ULL, 0x06CA6351E003826FULL, 0x142929670A0E6E70ULL,
+ 0x27B70A8546D22FFCULL, 0x2E1B21385C26C926ULL, 0x4D2C6DFC5AC42AEDULL, 0x53380D139D95B3DFULL,
+ 0x650A73548BAF63DEULL, 0x766A0ABB3C77B2A8ULL, 0x81C2C92E47EDAEE6ULL, 0x92722C851482353BULL,
+ 0xA2BFE8A14CF10364ULL, 0xA81A664BBC423001ULL, 0xC24B8B70D0F89791ULL, 0xC76C51A30654BE30ULL,
+ 0xD192E819D6EF5218ULL, 0xD69906245565A910ULL, 0xF40E35855771202AULL, 0x106AA07032BBD1B8ULL,
+ 0x19A4C116B8D2D0C8ULL, 0x1E376C085141AB53ULL, 0x2748774CDF8EEB99ULL, 0x34B0BCB5E19B48A8ULL,
+ 0x391C0CB3C5C95A63ULL, 0x4ED8AA4AE3418ACBULL, 0x5B9CCA4F7763E373ULL, 0x682E6FF3D6B2B8A3ULL,
+ 0x748F82EE5DEFB2FCULL, 0x78A5636F43172F60ULL, 0x84C87814A1F0AB72ULL, 0x8CC702081A6439ECULL,
+ 0x90BEFFFA23631E28ULL, 0xA4506CEBDE82BDE9ULL, 0xBEF9A3F7B2C67915ULL, 0xC67178F2E372532BULL,
+ 0xCA273ECEEA26619CULL, 0xD186B8C721C0C207ULL, 0xEADA7DD6CDE0EB1EULL, 0xF57D4F7FEE6ED178ULL,
+ 0x06F067AA72176FBAULL, 0x0A637DC5A2C898A6ULL, 0x113F9804BEF90DAEULL, 0x1B710B35131C471BULL,
+ 0x28DB77F523047D84ULL, 0x32CAAB7B40C72493ULL, 0x3C9EBE0A15C9BEBCULL, 0x431D67C49C100D4CULL,
+ 0x4CC5D4BECB3E42B6ULL, 0x597F299CFC657E2AULL, 0x5FCB6FAB3AD6FAECULL, 0x6C44198C4A475817ULL
+ };
+}
+
+void
+SHA512::process_block(uint64_t * w)
+{
+ uint64_t a(h0), b(h1), c(h2), d(h3), e(h4), f(h5), g(h6), h(h7);
+
+ std::transform(&w[0], &w[16], &w[0], from_bigendian<uint64_t>);
+
+ for (int t = 16; t < 80; ++t)
+ w[t] = sigma1(w[t - 2]) + w[t - 7] + sigma0(w[t - 15]) + w[t - 16];
+
+ for (int t = 0; t < 80; ++t)
+ {
+ uint64_t t1(h + Sigma1(e) + ch(e, f, g) + k[t] + w[t]);
+ uint64_t t2(Sigma0(a) + maj(a, b, c));
+ h = g;
+ g = f;
+ f = e;
+ e = d + t1;
+ d = c;
+ c = b;
+ b = a;
+ a = t1 + t2;
+ }
+
+ h0 += a;
+ h1 += b;
+ h2 += c;
+ h3 += d;
+ h4 += e;
+ h5 += f;
+ h6 += g;
+ h7 += h;
+}
+
+SHA512::SHA512(std::istream & s) :
+ h0(0x6A09E667F3BCC908ULL),
+ h1(0xBB67AE8584CAA73BULL),
+ h2(0x3C6EF372FE94F82BULL),
+ h3(0xA54FF53A5F1D36F1ULL),
+ h4(0x510E527FADE682D1ULL),
+ h5(0x9B05688C2B3E6C1FULL),
+ h6(0x1F83D9ABFB41BD6BULL),
+ h7(0x5BE0CD19137E2179ULL)
+{
+ std::streambuf * buf(s.rdbuf());
+ uint64_t size_l(0), size_h(0);
+
+ union
+ {
+ uint8_t m[128];
+ uint64_t w[80];
+ } block;
+ std::streamsize block_size;
+
+ do
+ {
+ block_size = buf->sgetn(reinterpret_cast<char *>(block.m), 128);
+ if (size_l > std::numeric_limits<uint64_t>::max() - block_size * 8)
+ ++size_h;
+ size_l += block_size * 8;
+
+ if (128 != block_size)
+ {
+ block.m[block_size++] = 0x80U;
+
+ if (112 < block_size)
+ {
+ std::fill(&block.m[block_size], &block.m[128], 0);
+ process_block(block.w);
+ block_size = 0;
+ }
+
+ std::fill(&block.m[block_size], &block.m[112], 0);
+ block.w[14] = to_bigendian(size_h);
+ block.w[15] = to_bigendian(size_l);
+ }
+
+ process_block(block.w);
+ } while (128 == block_size);
+}
+
+std::string
+SHA512::hexsum() const
+{
+ std::stringstream result;
+ result << std::hex << std::right << std::setfill('0');
+ result << std::setw(16) << h0;
+ result << std::setw(16) << h1;
+ result << std::setw(16) << h2;
+ result << std::setw(16) << h3;
+ result << std::setw(16) << h4;
+ result << std::setw(16) << h5;
+ result << std::setw(16) << h6;
+ result << std::setw(16) << h7;
+ return result.str();
+}
+
+namespace
+{
+ DigestRegistry::Registration<SHA512> registration("SHA512");
+}
+
diff --git a/paludis/util/sha512.hh b/paludis/util/sha512.hh
new file mode 100644
index 0000000..1170873
--- /dev/null
+++ b/paludis/util/sha512.hh
@@ -0,0 +1,66 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 David Leverton
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_UTIL_SHA512_HH
+#define PALUDIS_GUARD_PALUDIS_UTIL_SHA512_HH 1
+
+#include <iosfwd>
+#include <string>
+#include <paludis/util/attributes.hh>
+#include <inttypes.h>
+
+/** \file
+ * Declarations for the SHA512 digest class.
+ *
+ * \ingroup g_digests
+ *
+ * \section Examples
+ *
+ * - None at this time.
+ */
+
+namespace paludis
+{
+ /**
+ * SHA512 digest class.
+ *
+ * \ingroup g_digests
+ */
+ class PALUDIS_VISIBLE SHA512
+ {
+ private:
+ uint64_t h0, h1, h2, h3, h4, h5, h6, h7;
+
+ void PALUDIS_HIDDEN process_block(uint64_t *);
+
+ public:
+ /**
+ * Constructor.
+ */
+ SHA512(std::istream & stream);
+
+ /**
+ * Our checksum, as a string of hex characters.
+ */
+ std::string hexsum() const;
+ };
+}
+
+#endif
diff --git a/paludis/util/sha512_TEST.cc b/paludis/util/sha512_TEST.cc
new file mode 100644
index 0000000..688f51f
--- /dev/null
+++ b/paludis/util/sha512_TEST.cc
@@ -0,0 +1,921 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006, 2007, 2011 Ciaran McCreesh
+ * Copyright (c) 2008, 2011 David Leverton
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/util/sha512.hh>
+
+#include <gtest/gtest.h>
+
+using namespace paludis;
+
+namespace
+{
+ unsigned char dehex_c(unsigned char c)
+ {
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ else if (c >= 'a' && c <= 'f')
+ return c + 10 - 'a';
+ else
+ throw "meh!";
+ }
+
+ std::string dehex(const std::string & s)
+ {
+ std::string result;
+ std::string::size_type p(0);
+ while (p < s.length())
+ {
+ unsigned char c;
+ c = (dehex_c(s.at(p)) << 4) + dehex_c(s.at(p + 1));
+ result.append(1, c);
+ p += 2;
+ }
+ return result;
+ }
+
+ std::string sha512(const std::string & data)
+ {
+ std::stringstream ss(data);
+ SHA512 s(ss);
+ return s.hexsum();
+ }
+
+ std::string sha512_dehex(const std::string & data)
+ {
+ std::stringstream ss(dehex(data));
+ SHA512 s(ss);
+ return s.hexsum();
+ }
+}
+
+TEST(SHA512, t0)
+{
+ ASSERT_EQ("cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
+ sha512(""));
+}
+
+TEST(SHA512, t1)
+{
+ ASSERT_EQ("1f40fc92da241694750979ee6cf582f2d5d7d28e18335de05abc54d0560e0f5302860c652bf08d560252aa5e74210546f369fbbbce8c12cfc7957b2652fe9a75",
+ sha512("a"));
+}
+
+TEST(SHA512, t2)
+{
+ ASSERT_EQ("ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f",
+ sha512("abc"));
+}
+
+TEST(SHA512, t3)
+{
+ ASSERT_EQ("107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f3309e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c",
+ sha512("message digest"));
+}
+
+TEST(SHA512, t4)
+{
+ ASSERT_EQ("4dbff86cc2ca1bae1e16468a05cb9881c97f1753bce3619034898faa1aabe429955a1bf8ec483d7421fe3c1646613a59ed5441fb0f321389f77f48a879c7b1f1",
+ sha512("abcdefghijklmnopqrstuvwxyz"));
+}
+
+TEST(SHA512, t6)
+{
+ ASSERT_EQ("1e07be23c26a86ea37ea810c8ec7809352515a970e9253c26f536cfc7a9996c45c8370583e0a78fa4a90041d71a4ceab7423f19c71b9d5a3e01249f0bebd5894",
+ sha512("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"));
+}
+
+TEST(SHA512, t7)
+{
+ ASSERT_EQ("72ec1ef1124a45b047e8b7c75a932195135bb61de24ec0d1914042246e0aec3a2354e093d76f3048b456764346900cb130d2a4fd5dd16abb5e30bcb850dee843",
+ sha512("12345678901234567890123456789012345678901234567890123456789012345678901234567890"));
+}
+
+TEST(SHA512, t8)
+{
+ ASSERT_EQ("e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b",
+ sha512(std::string(1000000, 'a')));
+}
+
+TEST(SHA512, t9)
+{
+ ASSERT_EQ("204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445",
+ sha512("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"));
+}
+
+TEST(SHA512, t10)
+{
+ ASSERT_EQ("89d05ba632c699c31231ded4ffc127d5a894dad412c0e024db872d1abd2ba8141a0f85072a9be1e2aa04cf33c765cb510813a39cd5a84c4acaa64d3f3fb7bae9",
+ sha512("0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"
+ "0123456701234567012345670123456701234567012345670123456701234567"));
+}
+
+TEST(SHA512, t11)
+{
+ ASSERT_EQ("07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6",
+ sha512("The quick brown fox jumps over the lazy dog"));
+}
+
+TEST(SHA512, t12)
+{
+ ASSERT_EQ("3eeee1d0e11733ef152a6c29503b3ae20c4f1f3cda4cb26f1bc1a41f91c7fe4ab3bd86494049e201c4bd5155f31ecb7a3c8606843c4cc8dfcab7da11c8ae5045",
+ sha512("The quick brown fox jumps over the lazy cog"));
+}
+
+/*
+ * the following tests are from shabytetestvectors.zip, most recently obtained from:
+ * http://code.google.com/p/squeak-cc-validation/source/browse/trunk/fips/shabytetestvectors.zip?spec=svn3&r=3
+ */
+
+TEST(SHA512, t8SHA512ShortMsg)
+{
+ ASSERT_EQ("e4cd2d19931b5aad9c920f45f56f6ce34e3d38c6d319a6e11d0588ab8b838576d6ce6d68eea7c830de66e2bd96458bfa7aafbcbec981d4ed040498c3dd95f22a",
+ sha512_dehex("8f"));
+}
+
+TEST(SHA512, t16SHA512ShortMsg)
+{
+ ASSERT_EQ("7dbb520221a70287b23dbcf62bfc1b73136d858e86266732a7fffa875ecaa2c1b8f673b5c065d360c563a7b9539349f5f59bef8c0c593f9587e3cd50bb26a231",
+ sha512_dehex("e724"));
+}
+
+TEST(SHA512, t24SHA512ShortMsg)
+{
+ ASSERT_EQ("33ce98281045a5c4c9df0363d8196f1d7dfcd5ee46ac89776fd8a4344c12f123a66788af5bd41ceff1941aa5637654b4064c88c14e00465ab79a2fc6c97e1014",
+ sha512_dehex("de4c90"));
+}
+
+TEST(SHA512, t32SHA512ShortMsg)
+{
+ ASSERT_EQ("dadb1b5a27f9fece8d86adb2a51879beb1787ff28f4e8ce162cad7fee0f942efcabbf738bc6f797fc7cc79a3a75048cd4c82ca0757a324695bfb19a557e56e2f",
+ sha512_dehex("a801e94b"));
+}
+
+TEST(SHA512, t40SHA512ShortMsg)
+{
+ ASSERT_EQ("b6175c4c4cccf69e0ce5f0312010886ea6b34d43673f942ae42483f9cbb7da817de4e11b5d58e25a3d9bd721a22cdffe1c40411cc45df1911fa5506129b69297",
+ sha512_dehex("94390d3502"));
+}
+
+TEST(SHA512, t48SHA512ShortMsg)
+{
+ ASSERT_EQ("1fcc1e6f6870859d11649f5e5336a9cd16329c029baf04d5a6edf257889a2e9522b497dd656bb402da461307c4ee382e2e89380c8e6e6e7697f1e439f650fa94",
+ sha512_dehex("49297dd63e5f"));
+}
+
+TEST(SHA512, t56SHA512ShortMsg)
+{
+ ASSERT_EQ("ce69dec20db2e702f51c6232ab79f0890d6f82aaed54d8d0b15d8b02095957b4442a23b8d164be7b1f3669c7981b58ff6cd853149a625771bd666b19d8f0c35d",
+ sha512_dehex("c197f08557e421"));
+}
+
+TEST(SHA512, t64SHA512ShortMsg)
+{
+ ASSERT_EQ("7c42d9b5f5a215db32cfbff9e0e57716e2e4b1a7f87a7bc8121229c6d1fe5989df3dbf20fc71281dcbeb55743bfeab9346e7feeeb07e3cabfb2aaf6cfbc02bfa",
+ sha512_dehex("a90596a7112d3b9f"));
+}
+
+TEST(SHA512, t72SHA512ShortMsg)
+{
+ ASSERT_EQ("ac2501818c6d49f5f20534fbaf751f4d6f7288252298ea5a7011f2736200cd9721ff64ad6e672b08bcb2f463a251e9533c3f77465f4db3dd69be1d8b2c52937a",
+ sha512_dehex("3ae1953415660623c0"));
+}
+
+TEST(SHA512, t80SHA512ShortMsg)
+{
+ ASSERT_EQ("59dff49557ca098bdbb60cf9934f038890df27431b81369d0fdf92d22ccbbd3a90bc5d060ab2e974af784872e4567d4e2c42bb6375fd9a4ed3a434fc9f23a918",
+ sha512_dehex("2bfc3a1b9cdf3485939b"));
+}
+
+TEST(SHA512, t88SHA512ShortMsg)
+{
+ ASSERT_EQ("814a68eca10f8861b7ac73d9d10a83d1d2f546dfe4c989b49fe9f17cc27d2897245b02f4bbbed4fda8d230534f0caaf2556126d69095e9bc8a4bf5eda4c351f8",
+ sha512_dehex("50f3b7d106cd77e9eec0d6"));
+}
+
+TEST(SHA512, t96SHA512ShortMsg)
+{
+ ASSERT_EQ("8b7acaf0d36f877ece73f9318b20828fd79d2a3f28c71069b61ba88d455e4928e9744029bc7f12b417700fd195ee49ef337877bca76251123dd72365f10e36ae",
+ sha512_dehex("3f08c108cce3eaa5f3bfa6bb"));
+}
+
+TEST(SHA512, t104SHA512ShortMsg)
+{
+ ASSERT_EQ("e46861bf4c6b85af4366d6917b19f51efe66eaff16c7865a28d267125f8849244fa04b0b07f07274de2ca150a0549edb3628b87d4a5f73791de0930a702f604d",
+ sha512_dehex("1e1c81a3f9b48383e68487560f"));
+}
+
+TEST(SHA512, t112SHA512ShortMsg)
+{
+ ASSERT_EQ("a1886c390fdd1503a6659f615403d0df814a50bc27854836ea40c90a04680a092733ea4deb7edf2d8cb6a35cef40f20d7b0f9fb0e42305087cbd813aabf599a6",
+ sha512_dehex("b48ada2484dcd78e6617c724b537"));
+}
+
+TEST(SHA512, t120SHA512ShortMsg)
+{
+ ASSERT_EQ("90953e45ef6c1fe975805ee62ab6431834c0934a81205d7e089068c157c9e2ddced188d869659457788f472f777273c76cb97a00807c83a769e651e11fb59f0d",
+ sha512_dehex("bbd0a4de4250249c873f5b289159a7"));
+}
+
+TEST(SHA512, t128SHA512ShortMsg)
+{
+ ASSERT_EQ("72ee08a00931be0bf39f68575c256a1c5661a1b0ed3599c684be4d1f4412094178294773dd23a6adb8f6daebed0683f5750a59602a7244a667d5d8f74cca5b18",
+ sha512_dehex("cae35cda11064e34b54647556c105523"));
+}
+
+TEST(SHA512, t136SHA512ShortMsg)
+{
+ ASSERT_EQ("47eb9110c93ff62130fa987478cc72b403e019aee6a1c20d20a7d5122bc1ad9d97dbdc40346aa9c624054f76ac7fcefb72975ed946a4c1af04f82f5c137439d2",
+ sha512_dehex("625656f0bf2e3f1dc2c9c4d310c650e016"));
+}
+
+TEST(SHA512, t144SHA512ShortMsg)
+{
+ ASSERT_EQ("b0ce8a67c15c98176b787459fe2f1bb5fb01d505930805c0cd9f363f24f5b8dc4a16bd4c9c8ba354f726ca60cccc28bc540819ae1bbe50f6b6acfeeb86f03e88",
+ sha512_dehex("c7b15d4f0ace943eba8c3af2f51913285149"));
+}
+
+TEST(SHA512, t152SHA512ShortMsg)
+{
+ ASSERT_EQ("15c77f321a179485aea271dfd0c1be284ecac543fc96a478a0ba93fb640ee708a6367c7123d35cd39be323c9beacb42c63046d7ca8f9bc749f800dde0e4d0dcf",
+ sha512_dehex("62149e4dcc5b79f473d115629f2da21d8c4ad9"));
+}
+
+TEST(SHA512, t160SHA512ShortMsg)
+{
+ ASSERT_EQ("9681299a52f5949e08b35563d6d35e9f72169f84ba76b9c01be6fbc81dee6000134e691a9b9bd7bc8940de1fc7e173261683b5c8ef7b0fc5bc014714971b0146",
+ sha512_dehex("5b9d847b7ef0965dd053a4d2da3b1e1637e71095"));
+}
+
+TEST(SHA512, t168SHA512ShortMsg)
+{
+ ASSERT_EQ("888e6d7fea0c37b40ec32852879131cb0068c580e4280e80b74d204f9c90ea3e943fd27cf2b7ba3111340f8be68b5af89a4b5086de075de25697b9272e0c7278",
+ sha512_dehex("1b1045583ca3e8a0116521b9bcbd4dd7b613c34b1d"));
+}
+
+TEST(SHA512, t176SHA512ShortMsg)
+{
+ ASSERT_EQ("42d70b8a3bedcc1b23f7466f34aac87241c807a87283686cc15cdffed68a257dce74bfa708cc684f1c93142cbeab751070e9852d368a378495e6ad9f8d27e873",
+ sha512_dehex("938d2d59a18fdf52c343b632301344d6a5d9c70a07f4"));
+}
+
+TEST(SHA512, t184SHA512ShortMsg)
+{
+ ASSERT_EQ("9c229867a7f26055471f0174fa141f8a5e6ea6a11fc9efdc6cebac2f243467804cdc2e617be5a99e32e10a00550995f728c72c4fb25cb2b17164058ab4f7f3f6",
+ sha512_dehex("77d59ae1bbd09376bcc9f5ac46ee834bc979e07ca5e2f4"));
+}
+
+TEST(SHA512, t192SHA512ShortMsg)
+{
+ ASSERT_EQ("bb607aa94d04f3a81b6b48fdae601e15ba8d43805f5a0b096b843ae6a2b25ba58b8b4f78257b8110cac1e61d27c01a2c6e3738cad3a01150cbbc332b8ad42dd6",
+ sha512_dehex("370995549d249c7eab97a577c09920c3df6c545fa885f4ff"));
+}
+
+TEST(SHA512, t200SHA512ShortMsg)
+{
+ ASSERT_EQ("5613c1ef219d4de9a3dd4081bb121671060616b3ec8b5cda50361c3d03a362e2c8559bd8cf421834109684adcac9bcfaf6d47e02ed3a39cd7bc2f52d0c81b329",
+ sha512_dehex("8a639dcf06aad53bc991d177c3d7a1661c96431876790f9d72"));
+}
+
+TEST(SHA512, t208SHA512ShortMsg)
+{
+ ASSERT_EQ("ddc9b2687ab1d99038032deec57fed9f19e69fc2c550d9074099490d1e72751fd95cba099f5dc9c303a3b3e22b949ba8a04d26de046e14339333cc31e78f4f7e",
+ sha512_dehex("9f311495c97643482637b51790bd1e3086571f05c4a173ae1605"));
+}
+
+TEST(SHA512, t216SHA512ShortMsg)
+{
+ ASSERT_EQ("d2f7740090d249237cd1acdbefc584b79aaccfc0e90e19a9f822f9e041e519928e5755a8ce91b4ca67c1355134e22a33fd5cad20d35f3fc58415fc12c6602acd",
+ sha512_dehex("69b522dae987f8b48864744dd571b39efa0051229011dc80b81989"));
+}
+
+TEST(SHA512, t224SHA512ShortMsg)
+{
+ ASSERT_EQ("dcc1967130f155cfe1422048b8a7b559ce90b5182528310f9fdf93dee9b72029bda0b5a9c474c48c38ccd63915fa60197a87043fd9c399117dbc4c47a4ae5389",
+ sha512_dehex("c9260d92c68ff1c5cae8f7c3e98869b66f13aa8b6cf1d5ff70ffa1fd"));
+}
+
+TEST(SHA512, t232SHA512ShortMsg)
+{
+ ASSERT_EQ("40f3057c2e02fcff3915744d2a87a7cbed4d1ace0a62658694a5c0ada892dcf25202a5821f37f4842c4d631fb0b5795f3d252e6ab914556801ec99c4002c0510",
+ sha512_dehex("baf280aa618c46d1b4713d42a324e34fc13a8fc33e7703261534443c86"));
+}
+
+TEST(SHA512, t240SHA512ShortMsg)
+{
+ ASSERT_EQ("eda1dda078e4245c51e837c2a8360b1440acfe2d58f7f32ea9a63dc2105e80ec5e162a23d8041cac382de7464c166e7162c620bbcc11d14d8e9b3cc88692b5f3",
+ sha512_dehex("9f91b4d09ebfef181f76596bb060085b3323185cd786460f47d6bac72188"));
+}
+
+TEST(SHA512, t248SHA512ShortMsg)
+{
+ ASSERT_EQ("a971341f79a1081653952b717c7e18e2e2289a4551cec34eb15944f28abfffc7b23e6121ea52efdd4f5c615414d2a59df02392c4740d8f678a773f1e6cce2fe2",
+ sha512_dehex("376549419a41ecf6e1776679cc9b87a4ddf70a9daf8880fd894a8a3233b64b"));
+}
+
+TEST(SHA512, t256SHA512ShortMsg)
+{
+ ASSERT_EQ("dadd0e04ad21dee2937facaf3671e0e026b0d947b377bab623ad45e94872ee8767c2983a10f53f92072eabf9fe3b41b12211e442763274a24f553c658bdabeaa",
+ sha512_dehex("5f264a9fce6c0416c3c399c6a2912a5f33125616a24a5b3cca3e7e16b263aee9"));
+}
+
+TEST(SHA512, t264SHA512ShortMsg)
+{
+ ASSERT_EQ("0044e76560daeedebf0b72b9be8a1437f5a9937e1f6ec8efa0bae0a490808e9d0d4babd3683b4414baf0e033c36b7748635ef9e745cd1dbab547af8e287d9644",
+ sha512_dehex("6989bf1032bcbf82c96f7a140042dc9ba9cafb5d439be5c6daa69b5d28c65df600"));
+}
+
+TEST(SHA512, t272SHA512ShortMsg)
+{
+ ASSERT_EQ("fbe69d13bbb3b9aeb8fb67cea126302adf2984ed02168a13519dca66e56eb0b189587b3b6ca9f14efd8e0a434db7b0caf337d62b4cc0752ccb942f3ca29b4596",
+ sha512_dehex("4edbb49bbf3acb02ce83c5cc7f83d2c386e873ada14976712b67277cefb3c5633a10"));
+}
+
+TEST(SHA512, t280SHA512ShortMsg)
+{
+ ASSERT_EQ("9bf2258b1ce68fa5982c296fec10c8343fdf5f995e82ea985b93f5437ab48e6615c7b7e9847c3c545ab909d5e54a6c3ea0166bb0bdfe838278dfd9834f5d25b0",
+ sha512_dehex("f0b1231cf60536f768e62f79dae86374660bde91a2e2fa94cff531e2536530406ace2c"));
+}
+
+TEST(SHA512, t288SHA512ShortMsg)
+{
+ ASSERT_EQ("6e659b4a07e3aaaea4b49c211a2720f5db8fc81d9749c0a8c0ffce189de896cd3dcc1a1b6381e3d82230715840d4c6ada741d64bf76234ce98b28b2afc96ad74",
+ sha512_dehex("785db29d4a665e802b68a406cd21dc776ea84e4daaf5a1df93a4973c03f6f75a3119ca70"));
+}
+
+TEST(SHA512, t296SHA512ShortMsg)
+{
+ ASSERT_EQ("bfd174600f799e4a9aea0739fe5b4deb43baa809ee46ac27f59ab5e44d10f9a69c81eed24cfb1b4c6e6fd1c51925fa0b380e5d0cc9f36262d6e0c0cc1abd6331",
+ sha512_dehex("8efcd15f3ff1156dcd64ad17bb1566c466429842f2cbb40a84941dc6b12b391037abc77deb"));
+}
+
+TEST(SHA512, t304SHA512ShortMsg)
+{
+ ASSERT_EQ("c2c8abde43c0c73fa9392e7b262d453a3c0ee4aca293dc866defe6e07c0d717319eb3fe6a33775ca5949b20617df03152339af03bf89634d9865f7f1eff633d1",
+ sha512_dehex("807eb33d10722e025b01739f82d7494d242cdf137f510df5d888db691d19470acaa2439009af"));
+}
+
+TEST(SHA512, t312SHA512ShortMsg)
+{
+ ASSERT_EQ("de42e2933c0fd240d4025dfea77fa4763b55620230668acbfd2e6a6426c2d6446de71976009e77f7b3e17bac91259902f7dfe4f8142f7e65008b6ee2207268d9",
+ sha512_dehex("282cd5ebe30187854c5fdd6b1ab4e49143addc3dc0f12561900e6328ffb3dacf28211ab6b9dce1"));
+}
+
+TEST(SHA512, t320SHA512ShortMsg)
+{
+ ASSERT_EQ("99ece2524110af64cf89eaed97b520343a97c859e3873860c2077b06e33337f0886af348bbdba1b41c0366d8a09db1ce2fb726d5d282525fcd1cc45aaf0e75dd",
+ sha512_dehex("4fb6eb7cec250c1763280b41b215f89791137212a67c758afc867478b223a800f025a72f1fa63881"));
+}
+
+TEST(SHA512, t328SHA512ShortMsg)
+{
+ ASSERT_EQ("1aac04e1cc461ca665bf12a578f8f32a6ebb7725686b5a6f461a5a035dad6d7565831caad2364f063ad73edcb210bb2fd04c2539c6eda849ec79baa934d7af94",
+ sha512_dehex("dbc0d771769987ed9c9a72a44a5728f929653d3d12c9efc7d1b109472962085719727b535e37b06b39"));
+}
+
+TEST(SHA512, t336SHA512ShortMsg)
+{
+ ASSERT_EQ("4800cbfbe54fbcd8c012180ccd82bbcc783b3413cdec87bd236786ebcb40eb3ad23f509eec53b23c2655959a0a2c53e81b5f3177e6c57883c0e09b48a09050b7",
+ sha512_dehex("b8c17a3fd266ed0374f61c19840f3db5f819271c9029acabc5252a1bfd2a5d03002a779eafda73cff4cb"));
+}
+
+TEST(SHA512, t344SHA512ShortMsg)
+{
+ ASSERT_EQ("ebc398731a33113646c7c4dfc01fb0aa35214a2de32cbfa99f300b2feb1dbdce203fcea6625b7c2a7205ff1b08096b29b58581a2ea7326163a4f52cdbccd2b44",
+ sha512_dehex("7ac3e7ae32d0677b28165d829a6b966b5fe032eb25f40299fe0735fd1b1134ead693ca0ef6ce88c82f3468"));
+}
+
+TEST(SHA512, t352SHA512ShortMsg)
+{
+ ASSERT_EQ("80d1d9053acc378f88f37cb828d3140a16f10810b3a515af301dcc1c7f030d752599a5f437bcde5ecf288afac9e1fb6c9a5e365c82afdf900a0eed6517d4be38",
+ sha512_dehex("4c2645d588b606782a6f45c3725d69d31a251115e6494cad7ca80c197644d811b648c2b2f94a99dcafcd5fd9"));
+}
+
+TEST(SHA512, t360SHA512ShortMsg)
+{
+ ASSERT_EQ("6a2ff2ef58640bc69dfbff046c6d8fb4a59a85dec77bf06346def8026dfa954e07992ffc364ccfe179e2949826b65db58dc53a05f61c5d6a279193203de9a2f9",
+ sha512_dehex("85ae73d64a09ac922396f80bd94d868a2359e3361bbe0fdbef3fd6e9d97f5dc05166fc2a81c64b29f93f80f4a4"));
+}
+
+TEST(SHA512, t368SHA512ShortMsg)
+{
+ ASSERT_EQ("fe69011bfeb12b7987a1251b225575448d22fb46ca08e909574b96a1611433e0109619cb4c1489e101283d7d2c2dc163cac3ce2416cb06dc27820818f482b3aa",
+ sha512_dehex("b63a627c6923e0998c8c789f56dac741fe7c567cdb7bd4ccca52a39fd001970a005dfabb9faad32f876b6725c979"));
+}
+
+TEST(SHA512, t376SHA512ShortMsg)
+{
+ ASSERT_EQ("29f146b6ca892586f198f2ba3f58c67d17199e34c19ac32e284047181d57e6bf4c176eb6ee084171ff2a96bd4bc312014351326ea3387e78e78687ee3127426a",
+ sha512_dehex("0261fbf7d72dfa185d1fd999c17e588ae37d6a646505e7ef03b581622228f9ccab7693b419fdc7fcd161390cb2d1eb"));
+}
+
+TEST(SHA512, t384SHA512ShortMsg)
+{
+ ASSERT_EQ("65cf4354a97b963597884f00701b8d4399e9b80612c3410bb223ef4523dd9ee19ab348e8a849128377a6c75622ef06e844b2b758c4aefa5d28c46d6e4dc7cba9",
+ sha512_dehex("7486acd86f8813a2583ce981d1cc8602864594b611ea132b1bce9f1cc4a2f6e545cbb539d4b86217c972affafe74fd51"));
+}
+
+TEST(SHA512, t392SHA512ShortMsg)
+{
+ ASSERT_EQ("ed5c3016c805319872023a70d900cc8a301738149ea83dc130a6ca19fc5348b2f4d7fc3b456d0cda749a72da116e6491dda0855ea7aa9b5bab9b7ce5efa423e0",
+ sha512_dehex("c33fe419b91191e51dc9fb32d40b43701e63d81d11e3918a460df9e1d2f3ea67779c5dff1caa80f07b3a09e71a0cca407c"));
+}
+
+TEST(SHA512, t400SHA512ShortMsg)
+{
+ ASSERT_EQ("729c1246e155e8b36e92a6fafcdff556df95e7c131c65df68e710b5f04f6552914ee5aa2faa33e8c5827e1781c5af5320f158cebe481d7d0ac54be07c865ba39",
+ sha512_dehex("bd50e2fe1f8f39f96e2044def04afd4c16c01bb1ed7694bab5b2610ece66813bdcbd40f023f4b96e336b9a39cafc2713f68b"));
+}
+
+TEST(SHA512, t408SHA512ShortMsg)
+{
+ ASSERT_EQ("b3723d26e481feba3e3dbae2e36d9b29dd8636d34570d7ea3d6bbf8ce7a254ba2677107fad2decee62d8f27728d9cc433cee34e42b2c4f473153f697145684f5",
+ sha512_dehex("5178db5a599b0664da75988433807d0a44a73d6e754220e3f948952e54c0d4b91a79c3e3fafb169bfcbdbb2d0799755ba67cc7"));
+}
+
+TEST(SHA512, t416SHA512ShortMsg)
+{
+ ASSERT_EQ("5f51ff37bb70ceab5c1f5feb33f4f6ddcb7545d22249cff63bbe1a57be8e0ddd7d86131306b599fd8bd5a044daf9bcbb2a8c80eef2079bbd377e0b4acdd408d6",
+ sha512_dehex("e42a2a5e142f98e06ec42f5c78684269c4719c3317a4c5b8c90381386fe69ae6b84ddfe495756d6e9da92d56af5b9eb0d973d5ce"));
+}
+
+TEST(SHA512, t424SHA512ShortMsg)
+{
+ ASSERT_EQ("4cf0a13f66ac155088a8da8a344b1c4c62ef13ef0237966134345abb11dd0c456f25710ab13148510a6fd615e1863970e8277f45733b95fdf627a4321a48c595",
+ sha512_dehex("550495b8bf8bf10bca9a70cf0599a6cd61c1bd22da2e2def5935c753d9f7f896c9364ca7b26831c91a0afe89a83733f38979020511"));
+}
+
+TEST(SHA512, t432SHA512ShortMsg)
+{
+ ASSERT_EQ("e04a1c30b76920518af66f5db87d7642fc1ef2b903e45a8215bf1a5b6de6772427d9b576329c28b3262ff0c1802dc0e6c7b2ac21a0df26a867abf509619c8403",
+ sha512_dehex("b6cc4def48738118c35fe4bab82fa61ae8efb930fcf428aa7606aa34e8c577f763455a5f33fc0722c9deb07ef9c6d3c26618560f3aa4"));
+}
+
+TEST(SHA512, t440SHA512ShortMsg)
+{
+ ASSERT_EQ("c9e076e1ea43672b08036e87afb175e32013da88408c92e5895165fe31a1c02d09c6246fe17e9e1696614e28b53ac0a6c50ade5f10949730b98d110c92cbd9b6",
+ sha512_dehex("143c7d79790a56697dc803ec93e6c68f27f6761ce9b374bf6843e167e2b90e6f5ade347eec3166ac5e2cc3e6f7c9f0939445c677f82447"));
+}
+
+TEST(SHA512, t448SHA512ShortMsg)
+{
+ ASSERT_EQ("1c0294a68024d098e7fdc14490a34dd579f47a6abd96acddca73a450dc608a840cf308a873376b6917e17c237df0ab76a736105734623e72024b41504e0ebeb9",
+ sha512_dehex("bb9e6086c137d0c68e6ba728f8c516a65b3ffe303d58b1593266fd51fe2e6713fab2b4dfb94aaeebeaf6245680f3335d118cc4d17c3356c8"));
+}
+
+TEST(SHA512, t456SHA512ShortMsg)
+{
+ ASSERT_EQ("77d81a877dab2228601a42bce6839f31b21e2b7964c308555a5462516b635e0f4d4d56b39778987c24b35f666b1667aafa4ecb3784d2ad130fd9882ecf1461b5",
+ sha512_dehex("8dbe0cf088e68bd30156ebdcad3cb932a69bf8a11c36719948b04a7aa2f1da0e54ccbc57eede228c5bb96c5e1442fa7f93573e650bb5154c56"));
+}
+
+TEST(SHA512, t464SHA512ShortMsg)
+{
+ ASSERT_EQ("588da105790cd974ecb2988ac398a72ceda9c5bcde026877b67b21443acb4434b78923a57341cb3da465b44a21717c42603bd904e2213b562c732342e26e61aa",
+ sha512_dehex("2de3f31fb5182e1cef0f982d0e001be75dda7753d3877f4fe8718530a84513ac06f7dcf87206f12dae0138f0dd4a1b52dd1a7df5d6c5f271133f"));
+}
+
+TEST(SHA512, t472SHA512ShortMsg)
+{
+ ASSERT_EQ("94829820a81040b549e89e7df9ac1d99851d57805a95cfd4044d09432f9f3abc803580a2397f38231ad391a1634c2f879e790f6e85045dd972dc080e3e7bc1b3",
+ sha512_dehex("c7680a02334453cf17fa4cd27cbf668e6cc12447aa0d710aa0b037ed991c2d9830cef104082e5683beb7ff011c572d899019d50bdc01f65c0e3729"));
+}
+
+TEST(SHA512, t480SHA512ShortMsg)
+{
+ ASSERT_EQ("e7e13c2abb76234415acaffa97ff804f22f20c9ef692044a00d4d49bf656963ab0770d19640081dbc9389d1382bad4fbc3dcd47fb1da671d0d046c34aed476bd",
+ sha512_dehex("ab1d93fdd1d247ad983728157e634612c12d6d5223e204aeea3935ba2c884f9a49376817b97546f2082b80771e2ee056c4b90caf641a656c10ab30d3"));
+}
+
+TEST(SHA512, t488SHA512ShortMsg)
+{
+ ASSERT_EQ("54a49b06b483faa6d34a8e1ea7ff5bbc44af9bfceba30f62993093e0bef1134ddef01355b04b5b7678f8446b6cc9eb017d79723de360ff9c6a0adb3679cd03d1",
+ sha512_dehex("d3ad500384e30bf680afa762bbc558be9f7281ec53d51d113d4b5da5c62b92c65db44ed2be43c63474c97b7e9c7d1ab9edcea0f8f59cc134a5a78b5310"));
+}
+
+TEST(SHA512, t496SHA512ShortMsg)
+{
+ ASSERT_EQ("8377f49071ee63696d231d960fc8f37f4a7751ece2121c4f59e00bec6a38f19148269e385a0d66b10246d3837a7eafd259dfa827fa0f961ff4baa9008bf81fcf",
+ sha512_dehex("9c542e4dd9a660850dc22a081c07453f233148f117726e00a9c59a536d7f98133c26a61ad78733a8cc03e6589e2ae253208b49c422c9fe8c4ff2b036560d"));
+}
+
+TEST(SHA512, t504SHA512ShortMsg)
+{
+ ASSERT_EQ("b908c46311cf787a042a54756dc751d995ea57a76624940f70a18ae369ae82c9ce61ff819dbe95f2dab0886718055cb3a39e39a969277205290fa090d3d7fa6d",
+ sha512_dehex("7bdee3f83c1af1cb0ffe6f1235d44f88d2436f234f211b8efd88d4dafb2c4f7159ebc14b7da65a64c6500f6d70449dc1b8dccb9c403fef87b47ab317aed319"));
+}
+
+TEST(SHA512, t512SHA512ShortMsg)
+{
+ ASSERT_EQ("d5cdaf83bb4a27eaad8d8f18e4bee9c25be949a761a0fd0fb2284cab143cad60beb5688734b2f81e9e2d640b425fd32ccb3d20d02d63c2c94c03ab3d9e7d9b4a",
+ sha512_dehex("095c7f30824fc92858cc9347c085d578885ff3614dd38ee7ee94a0f44072c877047ee2ad166fdba0e744c3ed2c2b24c9d8a2934648dc84d3be666302110ae08f"));
+}
+
+TEST(SHA512, t520SHA512ShortMsg)
+{
+ ASSERT_EQ("f63022f528910ee310028dfb0782db51b79f4b8063543f15eb008618c50f9b8721603f7381baf083b34beb01cbb8d985db3b8e1eb53854ce3bb62ce7434373b3",
+ sha512_dehex("baf66cf83ab8a22878d02194b7c56599717cd3db4a594a8942a7fce32e3a7cf9695217b5c7c3681bca5327d0196442d92dd32fa64e1f804fbeceb81d340c5d4c8b"));
+}
+
+TEST(SHA512, t528SHA512ShortMsg)
+{
+ ASSERT_EQ("af4a2fc9681166fe70d4f0fb8d219d56a1f4ce532a7db8f94c4432ac41e370295977dbb0c4e356a8d2b1d791d513029f96d144cd92f45bd4230cda84bfd04a69",
+ sha512_dehex("aaa20338001d524041919bbb13926d0729a099c27c599598d8ec22599bd12d4fbab8f3ce04bf690cabe7db3300c9d3b57e853ce00afcc7b2793f8eee5346f86fd6e6"));
+}
+
+TEST(SHA512, t536SHA512ShortMsg)
+{
+ ASSERT_EQ("f499e9f1b19c614857b63bb44c095cb19b7cf48c5d6e0a6eb15cbe0eeb61e0bdf7bf0f049cd3d146748196718698248360a174f878113305c6633f10ddff0b8f",
+ sha512_dehex("8cf929dee0a854f7071f7062c911338e298655e0462f97a983f60455e6da77e5befa5d9f89efbc03145f7502e4cfc66bd5b912a601dfe5a4e3de3316bd06e0dd366985"));
+}
+
+TEST(SHA512, t544SHA512ShortMsg)
+{
+ ASSERT_EQ("6869157dbbb2117c0cadbd3402203fd7ccf22acb6a85b9efda4f3d3f54903a65b39260bcf8fae978f1559492113081171b7425bbd15b40a2a1c7d2557fe7cf44",
+ sha512_dehex("47b8bae735771d17d740f537bfeeff1d4012d80379e81d238e89d1843961ff1382e4a0f5ca7dbe1c0ec7da186a008c30dcbb69b24bd42987c8a90a0a13876f1b6163cd6e"));
+}
+
+TEST(SHA512, t552SHA512ShortMsg)
+{
+ ASSERT_EQ("149e8b8ff19a532d22a72d9d0390d51a365f0c2fc288acffe99efa5cd21c37f9d39cd307faca020df2aab996fc6b46815133c52a87a3b1ae350833e3e6adb1ba",
+ sha512_dehex("eac31a21d4943d32747d63604d09b9b29a97f0a632b04024af98adb1cf2389e51bca3a1fc6fe3d77d7bd6bf48b627b00f4c1c918e77355c8156f0fd778da52bff121ae5f2f"));
+}
+
+TEST(SHA512, t560SHA512ShortMsg)
+{
+ ASSERT_EQ("a6f42a3755bd9940d2f464b2efd42e26e7ad63b2ce26d39dccfe73aa7017e0d5babdc6ca8b8b0fdb27f014537863db09b92f100ea503490e4d1c7a4618372777",
+ sha512_dehex("28cf2204c192776c904b1288b5b398f99c9189cd6988c4f69a334efbe7744fee6d085d9e0c5ffd0d0eab672509388aa606fb5063e26d23aef59ab011f274eb3f0e6e53496546"));
+}
+
+TEST(SHA512, t568SHA512ShortMsg)
+{
+ ASSERT_EQ("ce34cabc906f67243ccd62ea6363f7ecbb7da3c8640799ddcb5783946d54d68f98e743b4028c5800a7716d524b171920b3b3fa95b19991032622ff9ee90771d5",
+ sha512_dehex("6efc3166fc8a21022171a50e793248b418dfe339c180728058b420d09a9ca4d60cf4d0ee3183679e00b63063958848b127a4bc353ace575d167fb91a77cfa9e58698ad0008d9d7"));
+}
+
+TEST(SHA512, t576SHA512ShortMsg)
+{
+ ASSERT_EQ("08cfdf043c67b265027c343e05e188a78646414f7f2adbba5fe0a9409b8ce173edc93db26e0e79c191c909ee21c7307ea7c582be30d5377512088c791ea20bd6",
+ sha512_dehex("f278f968b3b8eac25ed38b4ac7d605930510bc8531c62eb06a281de11c84f0f382ba57e86af02e393986a4692e4c9ce0ebf353f731c24350eb8a48686edc026fff797a57950a082b"));
+}
+
+TEST(SHA512, t584SHA512ShortMsg)
+{
+ ASSERT_EQ("901313c1af212cdcb56cfdd1e2642c0387d6152368a8150cfb3ec6758b45eebced1a50dfbb473c9809accfb575e1eb653a8138080ae08fe85c7010ba8626853f",
+ sha512_dehex("816958892728429100099fbfe5512a367cd7ee2154c6fe99319f67c9a47d6350df9dcfe6c81ddf434c04113df6835f30c07bb9a2293eb227879a7a839f140c0f7371a85e5b7b841f57"));
+}
+
+TEST(SHA512, t592SHA512ShortMsg)
+{
+ ASSERT_EQ("6985aae9d3e97d29b4ba174b4aed7abc5beacc4946a00e6b0921f7978b8cd62fdf897a9ecf94ea2e053bb732f2d6b1a44c1eff9c0ce43bd5ad2aff41121aa12c",
+ sha512_dehex("a2a1de6f0ea927b132bf987abdaa725b0e1e274e46830e99a2f75af608964df0dff9a99024fc6839bac5acd10202f921ac71a27fcda681aa3109ebf5f21ee3a849098ea3a551e844fae4"));
+}
+
+TEST(SHA512, t600SHA512ShortMsg)
+{
+ ASSERT_EQ("07d0426622c4f5c5dadfd3978fe9edd52b90bd8a9cea32eec6dfbb5cbbaa2549bc7ff15b8568ec716bf315e28b108f35274e4d4cba1f97e7dd7d54d63f8128f4",
+ sha512_dehex("e17c9c1af29e6c3c10f97fdde3a35cf4d37157176fc711ef10ae42eab927b62f42c096d7b664e95af9775a47ae233c3957eccb06be8bb53995f9d9c359ca4eed7cbca791c290758aec180e"));
+}
+
+TEST(SHA512, t608SHA512ShortMsg)
+{
+ ASSERT_EQ("ac0fc8acd30a0c7d4e1a3f965d157af94c4c9d0fa172ad1d4e6b200cec02cf345f0318cc11aa2c9de2867f7c6768aa75548c30c6ae711a6e68ddd0b27be808e5",
+ sha512_dehex("45527df1eb7033e31c0733d7a384c642359a6118018ad43488a2c5faaf035d3b12a841589ca4c4ab55ab5b227ad4512dd39dbbdb4130af4097e5b119aa076eb3acdbad08b5de822ba34fc4e7"));
+}
+
+TEST(SHA512, t616SHA512ShortMsg)
+{
+ ASSERT_EQ("382ce23a5bcd95acfb9dc3c9e6962a8ceac1512a0df09ce741fe4c2890e268c637826ee229869663dd8dc9cc83ca5802aba02a769a667dc0d180a24af90dec7c",
+ sha512_dehex("eb41a4fa67ff100792cdf1b7c3b8f88dc276ce1a2c3f9d7219dfd1defb0820d0caecc71c5e0b17641c4a31d4d4460e10eae7c26bb438015a2476e228a767e3eb4cec2db629da1a10fb06f5a50c"));
+}
+
+TEST(SHA512, t624SHA512ShortMsg)
+{
+ ASSERT_EQ("d202fc7a97202fea9fdffda2f7cb874e2054c7d6747f904d198cf8d1831eadda653fe79198fe264ef88e480ec731af47165b080ea6078cb7c5bc71dc3fd4c65f",
+ sha512_dehex("dde16e701bf40e42cbb1ad213a84167da405963befd455b699c7e504f0481c7a81f81f72d299c04b542a0ab293531920b00430a4115a05e357c25f5d9060e3f2aeb22ba43970199e40b76b769567"));
+}
+
+TEST(SHA512, t632SHA512ShortMsg)
+{
+ ASSERT_EQ("f7cedc950dd26e26b087940306a92f43f77ae039c34144aff8c5c2cb01214f18108f913e81d621e45a53e035a7f578fbe2d7831bf39c71ed9e7694d95d69efa5",
+ sha512_dehex("a530841c4cc46eafe5435317a3651d69db7aeb1ab75062092f5743c0350343f73072175aac4fce8d50f6636c10d99397a422ec2e389a27d965c9b70c605fa28971d29026a74921d0cbb984d0924d46"));
+}
+
+TEST(SHA512, t640SHA512ShortMsg)
+{
+ ASSERT_EQ("c527bb959f9b7314e10b83a89e22d52e9a47437050b67bf47be7805eb151e5bb08e3ecf4b78d3fbd40c115dab9ddd27fe033cae82e259a880872f74413d2945a",
+ sha512_dehex("d7289cfbdbb66582d93c8d1f03f9e3b4c57955c69a18622623c2d2d07afca413c42848f205040ecb3975df36a0832b3059a42279323d273abf6681eba9ee5474499ed09275c2a97d9ae6c7c80bde3e88"));
+}
+
+TEST(SHA512, t648SHA512ShortMsg)
+{
+ ASSERT_EQ("0b54fd35a70ff3abc587670afba9c671c57a50bc6a2cdc2deae2a0c98495adfa4559519184f9812c844eb3dd4621facac85de88fdb2eba9fd38cbbea697923a8",
+ sha512_dehex("b6aa7703b126ffbcdaee16664e82ce20be9a90fa0968575a101d1b9fc6ae910586d811c8aa62d78d59a26ffda0426bb3c4445758d744ef0c8afd8f08420fea826e00ffd1178049d2b8f1368a5126db0db7"));
+}
+
+TEST(SHA512, t656SHA512ShortMsg)
+{
+ ASSERT_EQ("4961166aacf83cba8b42614ac5e699788a995462be37019bc6d8281dc84ff07a19840d9e2e3f1fcbd995903b537de325087d81a85bee94430d96de56c2d6a275",
+ sha512_dehex("1263458e97c49296f48ed339144f682a6fefb11b824c20807c2192953b2cdfa27690af7d3c7890519dfd469fa74a628294fd173741d148dce27ae578f5d1783c7431fb094f21ed321933a582012ce5810564"));
+}
+
+TEST(SHA512, t664SHA512ShortMsg)
+{
+ ASSERT_EQ("f6335ee270b1a6795528df400d0daec52eddfd0571a2c2c3722047fc1e08498263d43e2900150fc2d098ef1b72c6a28054a620d5f2bfde80714f0f07093cc14e",
+ sha512_dehex("caa784bf0dd2605026635e8b19db46249da32fe523fda345133afe3b592e175420e12204dd87d53990b2ca3647c7259fe3ae76d01ecee173cd397c526323f869b79984400770ee783c7b0ba36f015a59ad6de4"));
+}
+
+TEST(SHA512, t672SHA512ShortMsg)
+{
+ ASSERT_EQ("84067e9bd1a74088edbab9182a39a43e8fa9669a7918a5dd2b0dabe0daf2395b6d41ec828e89ae9ac5e63f54a0dbf7659c13ddc20d2d3d33f30fe5d1747ac341",
+ sha512_dehex("e1b77436f6d15a209fdc68a636d96cf38c6850d388dfe369119ddd242e9c1def6c4634a8818a27d42e2e71916a6748cbbca721b3e9b6766dcf04c709913edfb5f41f5831098961830dd4bfeb8d661219cd835a9e"));
+}
+
+TEST(SHA512, t680SHA512ShortMsg)
+{
+ ASSERT_EQ("7a1d2a43df8e5f2521d93269d5fe069a555e460d0fb72bee3795c018d77ced248876f86f4e668756f035f2af5fb23c78529278c2a8d773eb060713c450f94559",
+ sha512_dehex("cff920294053417495f5ba31281eda43e264ef8bad555fae2c5ff419a9ed78434fd3823299ec8f410a0154201fed531c82ffada180a037fdbd36cf662648f13f28e285971f3bfbf312959a4d9d65155c2eb4601675"));
+}
+
+TEST(SHA512, t688SHA512ShortMsg)
+{
+ ASSERT_EQ("f1c616ce75361a068fc44e8626712dfd535dd37a0a9e8b3b1dfe9cc7b320864664b96193c3728450114c0f4093595202f82b7dd2a37d4b55f01ac24e6f108366",
+ sha512_dehex("03a0c0668e3984b2292d9bd4cf57051ba2240b053b9a2a5f3e9954ae316158ce8e559ed916ff174b69537463d43896cc6a44467c56c727dd6f0ce82a0ddbbe1c1b4212c76e9677be55b4de7e728c0d0ac8e14dd2144a"));
+}
+
+TEST(SHA512, t696SHA512ShortMsg)
+{
+ ASSERT_EQ("52d5bd5dad0f1340fa3213ba2e94db95ac2bffacea3647bfb94163427fe7eebe5fe6f49160776da6cd9670a617aaab39bb73c5307424e61eb2cd03bdf186eeed",
+ sha512_dehex("814c6906076a3a531d6cabd94025549fe78576b671bd8c785ca42212b75aea40da2b0d5854b6bf8a254e16662ea01c9ee596230e4d7c58f926629b9660c18ecbd661ec3839791d774a1907a24dc52616ba62df77355711"));
+}
+
+TEST(SHA512, t704SHA512ShortMsg)
+{
+ ASSERT_EQ("036b62ec6673ed63f225f6feb88933809c32edae2292925fb888181c1a0b36cae40e22aaa6db0061e92001e63e4e25886c1d5e8d49b84b928161ddcde950ad64",
+ sha512_dehex("4edbba7c47286bdb1343da9127a036624ab9a42cec0e3412ba6a13d96f670392ed34097a8c96651eb22dc7c3a4f9c0049b1d77bd1be29d2880fea346da172a81fa83bb8fcd52b899e98e929d66c13d11efb8e1c91887d31a"));
+}
+
+TEST(SHA512, t712SHA512ShortMsg)
+{
+ ASSERT_EQ("7e2ecfef69de2b9fbf553e274dfdd983bf712ef581c4996c0e80590cc7e4e884842561a4690bc5e7c3b5299565f9374b0c97f8e966982a5b15699113541ba784",
+ sha512_dehex("267b4d93feba7d7927ea2def7a11994cc35a8d3dc50e85607fbf130eaec7817893f1b7f5f675609a6b2a490cd4f70992278ae76e724df86e1c9688be6d1fbb0050b5749e5834765f02b2ca393afb6067203ef9bb0b054334ce"));
+}
+
+TEST(SHA512, t720SHA512ShortMsg)
+{
+ ASSERT_EQ("3f2f168af618dc5fcafc8dd644295da4a022f975e3518ec5d1046a3e9ed16756dd5019e98fb85cdea2abf5e47c955c064f7bcdefb02d49c1f92b151c215217ea",
+ sha512_dehex("ee4ce14bfebdec4ae1b84d73bc62e143ec3098f5905a1e99478dba663be176515e0a80dff3d2d03751c70b7be330a758744651dca9a18b88cff19aa7d7ee9fde9f92040374851932d4d9ff1e78f7c6a692d9d2a9537a831ab08b"));
+}
+
+TEST(SHA512, t728SHA512ShortMsg)
+{
+ ASSERT_EQ("745f4cbc34ca7727bf2ecd38aa24126e0566eb0ed633b5f3ddd92ecd74fea28059fd5d7b0810177f22be7d776aba3f63269328b7451b336cdfc78724c6c329b4",
+ sha512_dehex("e742e8c107336988161ca3343f532b59df8e6c02dceb9ce03833efa8e65f0ab6dc5bbaf6690be604c98cc292f7bc460bc2fcdf752334649cce184b6d07aa1da0b700279abf4873918c09f6f1ebac0bfe1f3a20bb3267af0b88d071"));
+}
+
+TEST(SHA512, t736SHA512ShortMsg)
+{
+ ASSERT_EQ("d9bcfb54e8dcea3f8d6c7110e7fd397e52d6d62be2fa758e30d79c7ae89ddff0447e01414c7b9b6057fa1d70f064c27da9f5c4122d46c91ee2c1573ccc65c24c",
+ sha512_dehex("1511d4d2b955be39525983b9a9144e9f60eff6362928d3493675d1e3f1ebc259ec1df98a1b881466412f19ada882c5f9158420fffb2d5512ef0dc1e95c334aa1784df2057611ab0efedb6ea6da9787b1f2e1334e7a6b6c5a6a9f0437"));
+}
+
+TEST(SHA512, t744SHA512ShortMsg)
+{
+ ASSERT_EQ("45e61293e86f22b3a3f24f21a9297dbfda1c414d691606599030816332a0f73ca3e7f6d6cd5120e1274e91427e4305cd4599d60f8d2b3069430da6caf8fce103",
+ sha512_dehex("5a040538682bda120fdc18b072408abd5f7627681d43f0b865051c1faee97353ae5ef8591dcacae2bc7b4cdb96e0844085f9c131f90c8147f59a91285a91765968c30c5482976ddb31fe148b6ca943b4177aa168c93828d2d2863ec97d"));
+}
+
+TEST(SHA512, t752SHA512ShortMsg)
+{
+ ASSERT_EQ("7aebcf0b69968dec55525b90722e5cfddae97e4bc0dd6630a88c24560ce7f6dc5ad365e1394c162b1fbab7dd159fac8d10e036e12da9102b36541486bf3a9273",
+ sha512_dehex("a9abd6f42a85681483904d9a94b70dfec552f073495865bea4d0a4496a8993734a0be62b4ccd8bbd57a945ebf68c97405b72e3a1a592d3255ed5f827488db19959644f9a0492764bba54c6dfb199bbf2e4fed21c5bfceec5ac60f93bc2fc"));
+}
+
+TEST(SHA512, t760SHA512ShortMsg)
+{
+ ASSERT_EQ("d78f40b72a42cbd0309417deea33ea3a317869e5242a6ef94aed63b96bfae036acdcd5144761e5077f8faf79d10c681a7c1144de553bdd9b742eb9aab76edd2a",
+ sha512_dehex("55218435049cb8e9346c6e9602c3601c9fa5d2bf0c9c757d21ae8a9ed48c4a8eb80c86e8c4d98bd3566948917730b355611468553f209321337c11339d9dd2c79bb982edcc7e68dc5a038e8937ff2278a6391cd2fe3f21b9aa5ba7d875c35b"));
+}
+
+TEST(SHA512, t768SHA512ShortMsg)
+{
+ ASSERT_EQ("b79ba8a1dabe9a89a383e8bb61750b4b84c90846671129abd1bed826345d97127c406b447664e3cf5305b5709baa29998c0f74b9f0038965be53a7620917d9c0",
+ sha512_dehex("e9a6317e3bc4d6cdd5a0833e52fb48baca16a9ba9b6c8ca469a0555763b54f04c87d4e41aa549258f30eefe5a52d2ba06657a8773b0842e094857b6d8911d6a0636280025e56356fade362b4bf4c875cc19be0c6644b447be0454dbf390eb966"));
+}
+
+TEST(SHA512, t776SHA512ShortMsg)
+{
+ ASSERT_EQ("6d32fec68eba7bcd27a1ca2395e582add90bf74c8cc0926249dcfc333240cbec609976134c541796ff86e6c4481960339b06d00b4a4c55b423ddff52e9595be9",
+ sha512_dehex("8d3108ebfbd2a6d248234e4eb76af905a899a886bcdba67e3a6d0e2eb2af8e1ce07b6a09d2b5c4244d231a7d6e7f10bc8dcb701366e56f717b5b32f9b48090b249c01a80e1305853fc69569e8e975f0beccd096dec9c72f548e3c8aa44e80f1391"));
+}
+
+TEST(SHA512, t784SHA512ShortMsg)
+{
+ ASSERT_EQ("30a38eaecdf787a4a2bc2e7e31e1c908112cea639cd882c0e88f0b3b8c131b5d791028150a3970ed79aba63421fb7735c068ccc3ef2ce500ba574f4e0515c360",
+ sha512_dehex("71599aa11c29f6629aacb58f1478e19988a504746cdeeb4894b7aa6a5541e08aebdd3c2e184d405f0e1145a18ff0c02953d5c34baadcc73262ada8d3eb09f123b9a25a88ea308f8e29c133dcd2502566569a02e4e22deb823bc288d9edcc4c1ea451"));
+}
+
+TEST(SHA512, t792SHA512ShortMsg)
+{
+ ASSERT_EQ("9a3bf2d701b6817baea83cd359257da3f6eb8cc34bf5169ec22a1dfc33001d6c4e7f866c2fb863dbe06106471437d0094215b9b17e7e27e90bd2eb05006e3d6a",
+ sha512_dehex("c436115d8fa97b11dbca495353e7a37a82b0816c44e3c1647a2977f2023b8443e7486aa2d49b5e3fcf799f2f234807b59ef7dfc0fd99f8b4a553f76d9479f18296f438c6bce774150a92f54d7076479afcb907f74dcdf6f14b4d4cae15274f2f3b0023"));
+}
+
+TEST(SHA512, t800SHA512ShortMsg)
+{
+ ASSERT_EQ("2828051603cc729ddc9feede736ca9f352b69ab5a916042cf1f9f90cf1d529d7dd0577da13f11f4f7bfac4c4f2d9a327d4c9924ccc93b8c14428c6824c939a14",
+ sha512_dehex("5e2a3dcd2f860045cce291de5f501048a724cbacf9f1604085b4221adb4ebe42ae381f0ad7728ea29cbc1ee73309477c8231d11c29e6f32ec2e9bd9a677db3dc751dbb57906a39ebe86778c9bae84c861948f56fee5b471d3ea30849abc79ae13e40d95a"));
+}
+
+TEST(SHA512, t808SHA512ShortMsg)
+{
+ ASSERT_EQ("bb66ae70b600735d0e9098f12fcd9aaac1f2141291e9bf54bb8e0013fce25ac1b878dfa5d0378814d84dd8892391da402891fbd7bcfec344ffe3272c5be7be66",
+ sha512_dehex("e5f4f4d833fc49da6dd083442214cb70d889efbefd2efdd820ac113b61f06bf3261ac4a51096e2d32e886b5c706ef7425e0168b0095b7e3c425fa6690b5613704bd61040c6e895c34b6918632fb1a5cdfb7331f462e42c597620558b1bc9d2e9bbf180af3b"));
+}
+
+TEST(SHA512, t816SHA512ShortMsg)
+{
+ ASSERT_EQ("ef50d18489656f7af6148e897d4ab3e631f0fd4f9fbd7f232a0ee288980b4cb10c2a1f890c77d13b4646ef133bb8816998dc8f88d5798ec7515f2c8ce607b655",
+ sha512_dehex("85c2ce900c00d962f759c2091dd6c2e9211c36f7f7e348caa3aaccf444a968925208f822244e3095b51c83a5a71b446988330c2755fe5b693c7c8253a608c033758aab5a8aefd12b8bd6a071e38c83f60a3b4e51065edcff3278f6b53e0677f577b2aee048c9"));
+}
+
+TEST(SHA512, t824SHA512ShortMsg)
+{
+ ASSERT_EQ("11eb07f3a5c143026a7824197c02e2a52281fa82e15ef976a7e63941e16951f00321f206f09c2ebc0bf6fd00bb879df894952b98151b0e8cc27b34515e1bf4c0",
+ sha512_dehex("f7f7f3bc1615653f479acd63042a0d15d636a071bdd02433d2bd156f2bccdc83ff6708490a68db91332e08ce6defbb0fdb4fda3137328a5374cff68ba2074cd713f40757bcc474b9ddc86ff4e5c86e39909ac22652f2193ef87c46968d2845d07ac6794df2d239"));
+}
+
+TEST(SHA512, t832SHA512ShortMsg)
+{
+ ASSERT_EQ("a8e4b47f67f1541c7fc0f2a13c5abb33a1d4a5d733d794f22edf760b146485ac53bd03038ee76e322fcc23667c4c209f6c61287a8c9c044f0c9922752a9efc0c",
+ sha512_dehex("d12a258ef4cc5ae35ba4e63aa23165945516f464aa098b966feb8ecf41389ef7ffa2b5f57ef972b97e4eb180dd585f530b178dd1beb6c22fe7b6967de4497c2bf7fce0cbf7997218454cc13802040b3e7f1c53f3f53bb5d67779f76124c3608ea180cd9ac7740109"));
+}
+
+TEST(SHA512, t840SHA512ShortMsg)
+{
+ ASSERT_EQ("2609ef79ea747fe6b00a50a2316c9d3ed2946adfd71cb3b1ad1262b3911add77c2bc76d121444c905ae865703e208bffd759b222b42b02cd13764c04298aab15",
+ sha512_dehex("a71a304ec61763764ad7881d54fe7d394e658e7588253ce223f23ce92fabc385102e01af2671eb19adcf3e1ee19fc1f9660bca36e8200367ff216e185521a7050ad06a8a5796545a72deee74b2b5e753f493a1653d78f0bfa13b1e0f631f32d25da871c7a2ad26a363"));
+}
+
+TEST(SHA512, t848SHA512ShortMsg)
+{
+ ASSERT_EQ("42463a62b1c92b3982dc4d666f8bf30ad5b3f383fc00ae3e65b5d4787ba0ce9f0c5e6d4d6446f1f480460fcac237dd1d82657b14dd8e4044954321ccba7f478f",
+ sha512_dehex("63df67c7eb2829ee72dd694949d92a24a0622c8f54ab6003089d9e4877d79a9508f415faa40c50fbc47dc67eceeb1ae7a1854f816e8a3720cb0c2e0402f50801af4747dd8aa891fa811d62340a16ff0db7abab080a251c528cc030a719afdd747e6166394603d532d046"));
+}
+
+TEST(SHA512, t856SHA512ShortMsg)
+{
+ ASSERT_EQ("d420448ee2c6eabadfce5856fe93383ef559d144c97349bc0af48b1c19a926bb40b62d3cc9334804e6991cb073baf976dfb52ddee24b5ce36d1f6789eed83574",
+ sha512_dehex("b95900674bc78a86f4f9b2203b2950f6eac9a59665804c833b6f6e90fbb8368d4941842530b5e607baccc444becddaf8fa51eb2d6149b4fcb64220f55ae8bac263c96706ed5c558bb5422f9de4cb93b128bcc54b0950a51e7b7cde74af7761d02f7a12d22ac5c05c0ce25b"));
+}
+
+TEST(SHA512, t864SHA512ShortMsg)
+{
+ ASSERT_EQ("cc7cb1a4a616ae4806e48cbc176542a4d75a5b07c25d9324c124db13328e656ccd1cda4f946f0425c5d79c1ba165b1a12933b92f7bc3296fe98c72b15cad2d51",
+ sha512_dehex("fe59b2da7c365a64901f6a132c957105844578ee0a2c955f9dfebd49fdc9dabd83d51df50fd096984127023aecb7e422c7a5d751668a22c069d48de8f46973875f8d19a22e053ec6437cf3945227ad7d96a599c9c2292fde3bda0abf847af7d3f9464ce8c11e7b77fee6e629"));
+}
+
+TEST(SHA512, t872SHA512ShortMsg)
+{
+ ASSERT_EQ("31b446c44b0aa2791cb7ab5834e4b8cdd2e3c5b4a96234b338c7b9431dab2bc532e4d71c7f84f07372c8a3f08feac37d0254cead9a9aa619d312a3c006992caa",
+ sha512_dehex("71f7ff4ba87d2bcb5ff81a1f42f47756f5189e6b5458011bff6ccaf41680c2af412d71bff4a8872af1397a980eef71a93893618cb8da75ceb5deb46ffacfde3bfae69657119bc61b0d18401fededa199e9057be6b2d9b366fae3278d37569437a40cb83c89c0b345bd7db3de69"));
+}
+
+TEST(SHA512, t880SHA512ShortMsg)
+{
+ ASSERT_EQ("02bdc51f3e4e129a4b21347d835b3611165424eb6607440c816979e6806e27df12c50413740b1602da26db7ee3e55e5ab4a62a8eaae24ef1c68d1510fc824932",
+ sha512_dehex("52b5a7af72437136650e64a49078aa831d8d715c46364c88d0b0d543d53d9802c71a2c07b2b0a332c10e251a0497d75c70f80133285e7149fbe51acd2d5301c67a065aa7582bed237d31bf42a17defb58560de673446925488305d9ef164b9dd726277b7ec1b19b29f5e7c45ee93"));
+}
+
+TEST(SHA512, t888SHA512ShortMsg)
+{
+ ASSERT_EQ("131ecdf4840cdc45557516205f07cc277b7641d05afc57cb7fe534f59d9cbe611e0e6a7b6aad61f1d39fdc7559f3048ac4d0a41234ddf07423dc61dbfddb7a65",
+ sha512_dehex("b698108304a44fda03e02fbd13bdaf3ae1c7786de61f7796312bcc6e678ce3bc0850e023f369413e2d5ebeefde4174f39ce143baec4075760648a073d9b9cda64f66d988d2a11c250ff4496ffa1295d9120c1c21e6c8806dd8b0d39a21a7b7d11541c35ba83329b6320896e86f165a"));
+}
+
+TEST(SHA512, t896SHA512ShortMsg)
+{
+ ASSERT_EQ("0cf871f3af1d3e5c9965619f479ba6b75be338afbf32b2a1fdec9361164357b2c4faebebff6e4a5af00389336434b5872285adb1e760ae99b19a812236000d22",
+ sha512_dehex("65f571e86f04f86dca7079e2ce8619a1f52057fed7cc9e88592a1a8c2196ccdb4d07d9cd643728868c052b78fe17fd29b8c3ae377130db99d2b88127e391125dc4adc95c9dde3b31d73e305a8dceb0863d5d619dc4ac100089cf8d12f8d6bcf732ade99c02415cf714e42d9061f35a40"));
+}
+
+TEST(SHA512, t904SHA512ShortMsg)
+{
+ ASSERT_EQ("b67a29b2280dae77184e2e7839a7f3b48f4054f9bd0ebf5ecf1694151966756ec4542b2285a53fa37515116c7db4f1aa492f9db0bbafa0567bdaea1bf0f26abd",
+ sha512_dehex("188d1fc4347ad766311a74574b46be4c30886742bfd1eec90f6ac4a3b32dae8d3cf56a5d0053954d1a83cc97b29e12427f10713b894de4a734c075787a04a33e785706402c4c36cc7dc0e8cb7b0e5a98e987f213f91c22f1565e8e5667a971a5d39b3c9740cb818a61b8101c2f0060f976"));
+}
+
+TEST(SHA512, t912SHA512ShortMsg)
+{
+ ASSERT_EQ("f3b2f66f9a9673ffc47d2c510d6de0a3ac90d59e9600f2600777b1d84446cf94588231a8b48987081209e320d62ae85acb4895731bef1710923ef0fa983340d0",
+ sha512_dehex("9bae33d315dd0e4fbed1a571e7e5f902c9c027817679f46810ffaab139b92399ca6923a4c856ebe194aa0a6f61197740ebc3dd1d675c36eab58a9b2cdd8e5ac8b9274a0defb35bf5239871a86ae27342012e9ed63fc620b3c80de2e6041ea500cfb05019723d8814d2638225e88a159171c7"));
+}
+
+TEST(SHA512, t920SHA512ShortMsg)
+{
+ ASSERT_EQ("90fd55013bb36a390be5bbc34bf9ef76ab200deedf3844f79bf5128fdf6fe71332a612e5bb3c4a2bfaec1bcc5510f6f8ec8414d5e13b0ebf2a67e84ce2282d2b",
+ sha512_dehex("a7d58b5cfb1841f6387ff658cfc44c2b14fbd1579f6d8276f2a38e885dc15ce81f16ce7fcef0c837f9b5ecb20b2fa83d722873ff0137537693d9a325f2c31386f777f046f216a6b14b75836c6a72bd62d589b70098a280a5ea2d9c540d7108ad7621781b2e31e34e78e741ecb4359483834625"));
+}
+
+TEST(SHA512, t928SHA512ShortMsg)
+{
+ ASSERT_EQ("99163db3dae57ca20c4327b88851f3c63187e5a2bbadf3c3dab341040619d2196c84c196cee861deea363f48a9f728b4816d2831033ab472f1c92e1ce748ba4f",
+ sha512_dehex("c3bd6ef24c7c64ba3b198a8949bb824b4642b6910b72edd8af531d0efed7805226beeafcb4b75addbfc8cfc863ef5d50720a7fd465f4afb999f134f7b84c3cd7743e2afb7c12319ea887221d777682b6bcb4e090943a65fc9b83adfb6036d5001605d6f78cd511855f1f2b926e961a058e0a80ce"));
+}
+
+TEST(SHA512, t936SHA512ShortMsg)
+{
+ ASSERT_EQ("f65de5d478319608168bde654963b9d410b6aa5bfd8d25bf2165a94b5d2ceba0eb792a7bf132c6c189748ef16fe87e196c862a884b6e2da9804c92b60bcde824",
+ sha512_dehex("9b6b821c5f536bbda82ff5036b6de56eb046a596469d9427b52aa12a74d718865c6abbc65d65151c702a0ba6cc63b4f15da16bbc724322feb69af92a614b0fb1aff497c892122f6da3226ea45f06bc0790ab677d09e9f34a96aab148334f93737c4f3eab652161b62b5d45858b1ea6b831aac26473"));
+}
+
+TEST(SHA512, t944SHA512ShortMsg)
+{
+ ASSERT_EQ("43394563a74a6d0a036b1dfc206a2ff1e8a2443d8f69b63372fa959360fafd5178d8e8793b2a44116a64313797b60cea5c93cba97a1e6309c2aa9436a2815c21",
+ sha512_dehex("616ab1a4a7782b8e1cc098b3ae4c70f7bec742fd7681a9475dba7b9f281c43b6d489f20cf117d10f4159ba8781e188318702ccaa8ddbc28fcd9083e34edb7bb1fdc41ef2ffacd7b04690416c628c9abe9a9e753b3cadae9b31caa31cd4b5a12105a39d1f783e25b953ee962af9578ee42023a4762a01"));
+}
+
+TEST(SHA512, t952SHA512ShortMsg)
+{
+ ASSERT_EQ("abeb62f84f587b997e09ee255819531b986c86e2568df29ed77b68a597331f2a977203a2f66566e37cbfdacc090d0464c49839cee7a8ff569c008758b0b1172b",
+ sha512_dehex("9bf0e5967fc1359ec7093f1db06144268e176e08098ba9d085d8b50fe2b779dd66a19b1df7344d038ed86ad4e8a2c1ed7f79b107b877f6b95e91c23e4f7b0f7975c63436f84cb7b3b2cd635fe4da9ae127f2ec5ca5ece8f288943187b399d5c7b0a7db6aead01bb61d3053460ad1760b6fcc479036b127"));
+}
+
+TEST(SHA512, t960SHA512ShortMsg)
+{
+ ASSERT_EQ("c7a4313191d56ef7a73064e271ac720322866a6ef82a42a2faeafdeb8d4da7df5200baaa286ee50c9464d0eb229b036c333ceae7b6a511af5c51dab79508641e",
+ sha512_dehex("a19949a0d6340be4a91b7973b705bddb2021a0d58f04aad474e68ade940fb99bc48c5bacf126663d649505de44f03f8e5d68d4191f3667a5ead2e2878966175bfc82a3537a1118cfb68c5b2e626d4ae4f1e7a2cda2d420c2baefe76910432251cfe3ea3e78dc6ac12668410c166427056604d4991dc61e53"));
+}
+
+TEST(SHA512, t968SHA512ShortMsg)
+{
+ ASSERT_EQ("fe3347c05519b9c4a61fa289af3153c56f96d04f67041697ba09bf9722a04be2bb15ae2399170a9fe206db8d60cb9940c6d6826db99860f31fd83e9eb9f72c73",
+ sha512_dehex("a949427f3fc83e578d9cc7ef6a510759f697bbe97d9739329e87b130ac7cb3c75480f16c80e547237cd9f8a9573a3bf28dabf6d6e2e7c90791554e46a6dd9fd6a9fb19317c1160fb8602a33412fc22b1f195edcd671aee5c452329e0526b4300efdf4135fbf593c7f53f51f86040c47e6c7e2837d2d8b01900"));
+}
+
+TEST(SHA512, t976SHA512ShortMsg)
+{
+ ASSERT_EQ("6d90357d4fe398642e7b6099fa2fb2383dedb02db019e90b2ed4058dd55311156e79b8aa970035d098fd3c0e26626ca9af42af491b36eb40097c6223d21201ba",
+ sha512_dehex("4157af0b3e7d291add80bdc7dac297a15861a6e66db24599e1eb1bd6331f3f63dd70a087d980a51f642810ee026d2835c2af1783c32491cff785b6c427073a5c388dc3b0ac1c920f6c8f664dc48c9d5dafb69d2255247283d213b8be39d7bcfed818de2fbe3a3a117b1d878b27073e43a6deff6b299b32def8fb"));
+}
+
+TEST(SHA512, t984SHA512ShortMsg)
+{
+ ASSERT_EQ("1e1d4bb3839438383be702d61d60f098d70257baef0f4058260e8d300ece538a0c3133b327a7f25055916dc8c8a5c7cd419c95d0664aa53742e8be6abd4b22f5",
+ sha512_dehex("bc79986ccacf533b9ddbe2bcd15958c3bcd86063f325dc051007cbb8b32c70c8c764b192070dbd96c0cef1ced889fd3f0f8a42cd85057f537dbfadf3600b27ab05f80e292fc9ece157a5975cac9059d3599a4dfc06560c24a18e897e5e353abbfc9d79da4beb2942ebc79c0e5658b4a8206f49997e02cb9f06dd29"));
+}
+
+TEST(SHA512, t992SHA512ShortMsg)
+{
+ ASSERT_EQ("f523ebd51c0f1d8e32a299f762f50826fd2341b8ae44d0c4841080bb626112ae1eafbb089b7adfd6e6668ac7ab684f78da2a23273058973e4cb660c297733912",
+ sha512_dehex("0a45314284915ec9021fdd121a3c99e7c01bc73b696d26607131857abace8734975fa3b1e84e6ec686241d66e19f455de706e64128b9a8a6380c64925555e6314a44f2c9937384efc23e5cfc22d5babb998f6764d382f4ce9c5046e08e435349ed9d2670cf2929ae8016a3bc240580679e61518bb1ef933e65a6344c"));
+}
+
+TEST(SHA512, t1000SHA512ShortMsg)
+{
+ ASSERT_EQ("a71b1ce1e582bca53d7615488335ca1ff351eb33a8c2c0105bec7ffcbd55e4533ee68209ec8b009066a2ff60b418d6b943816cca9b53b7bf64a34feaa4d63600",
+ sha512_dehex("8beea2e048193dfa755a594306ad9825c77659d037092ee09a6f91394a68d2364eac54042d76f9480443db08d7d73dc82582c1f3bfa1db7dda6785c762de34c391280b58c10b4f087ead1cd0e09b564f1710e12b487515b198246cbb86717ed77deb30a5a9df28810b1e8462c800cb02c7a923407a8bc5c2fc2cafde5d"));
+}
+
+TEST(SHA512, t1008SHA512ShortMsg)
+{
+ ASSERT_EQ("c8a04bf3881d0582e03563af73a675e40dc9918fcb5a138b8c6fdd057df0c11b112a6dc0664a0dff8a316c3a645ac87dd25b644d061700306bbd7dd805879b55",
+ sha512_dehex("f4259473bfd39877bfe9597353d7ce8dd520c66d1fc7884e4e03b655c63a7721762dd4a35d7163304c1e23d4eecba8ea07b978e9f94eb4818cc5fbe7ee258b6df96fa955b51c44e71ec6d5c12726896ffe3ea23b92d71a46532e8ad838eb4bf50752db31d1bd82c5bb4a35e105d1ba4444190d0bf24b03c629a62dd1ac75"));
+}
+
+TEST(SHA512, t1016SHA512ShortMsg)
+{
+ ASSERT_EQ("ec83376ff6f633ee2d898d87a6a91efb0788bce188fac7d3c4c35f81ba6015640dbfad1f8584557ec210478a0cb566f1490643ce602aa5abfab63d46f7f1d4ee",
+ sha512_dehex("d60da691585b7c0c3714905411ae8e3515e8490dbbaf07d1b2431f501a96c7bcf4f52766d7e9b2c9e460b5cafc08303e30fce6ad78a2b055a8d31672a13d20bdc4066a33adb277171d47473a37af2c7af05dd989c134bcf09ea48e532c1628f62f8a9880417e74ffca126e2d2c6b29f23e554b29fc2cd4a77dfcae7925e784"));
+}
+
+TEST(SHA512, t1024SHA512ShortMsg)
+{
+ ASSERT_EQ("6e7fb797dfca7577432c0b339fe9003b36942a549b112d32016b257c9a866e4385e01d4e757d4378b8e61f5a8a29aa73f2daafdaab23dfe4e0b93df21374e594",
+ sha512_dehex("b7d5d5f8955d1ad349b9e618c7987814f6dc7bdc6c4ee59a79902026685468d601cc74965361583bb0a8aa14f892e3c21be3094ad9e58b69cc5d6d28a9bea4afc39dc45ed065d81af04c91e5eb85a4b2bab76d774aafd8837c52811270d51a1f03300e7996cf6319128be5b328da818bde42ef8a471494919156a60d460191cc"));
+}
+