summaryrefslogtreecommitdiff
path: root/validat4.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-07-28 14:57:12 -0400
committerJeffrey Walton <noloader@gmail.com>2018-07-28 14:57:12 -0400
commit28fe1a6a4d51a863cb55905e2f8620440994bbb4 (patch)
tree6ede09d971bf030ff6b356619d0adc53a1ee3d73 /validat4.cpp
parent0ea807f2eb80cc7608f07aa75321a88c289aed56 (diff)
downloadcryptopp-git-28fe1a6a4d51a863cb55905e2f8620440994bbb4.tar.gz
Split validat*.cpp source files
Also see https://groups.google.com/forum/#\!topic/cryptopp-users/j_aQj6r-PoI
Diffstat (limited to 'validat4.cpp')
-rw-r--r--validat4.cpp2172
1 files changed, 1708 insertions, 464 deletions
diff --git a/validat4.cpp b/validat4.cpp
index 8279ceb5..bd199734 100644
--- a/validat4.cpp
+++ b/validat4.cpp
@@ -1,533 +1,1777 @@
-// validat4.cpp - written and placed in the public domain by Jeffrey Walton
-// Routines in this source file test NaCl library routines.
-//
-// There are two types or sets of self tests. First is a known answer test,
-// and second are pairwise consitency checks. The known answer tests are test
-// vectors lifted from libsodium. The pairwise consitency checks are randomized
-// and confirm the library can arrive at the same result or round trip data
-// using it's own transformations.
-//
-// A link like https://github.com/jedisct1/libsodium/blob/master/test/default/box.c
-// references the libsodium test data for a test. For example, box.c is one of the
-// test runners for crypto_box, and there is a box.exp with the known answer. The
-// glue code for box.c and box.exp is in "cmptest.h". box.c runs the test and
-// generates output, while cmptest.h gathers the output and compares them.
+// validat4.cpp - originally written and placed in the public domain by Wei Dai
+// CryptoPP::Test namespace added by JW in February 2017.
+// Source files split in July 2018 to expedite compiles.
#include "pch.h"
+#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
+
#include "cryptlib.h"
-#include "secblock.h"
-#include "integer.h"
-#include "naclite.h"
+#include "cpu.h"
+#include "validate.h"
+
+#include "hex.h"
+#include "base32.h"
+#include "base64.h"
+
+#include "rc2.h"
+#include "aes.h"
+#include "des.h"
+#include "rc5.h"
+#include "rc6.h"
+#include "3way.h"
+#include "aria.h"
+#include "cast.h"
+#include "mars.h"
+#include "idea.h"
+#include "gost.h"
+#include "seal.h"
+#include "seed.h"
+#include "safer.h"
+#include "shark.h"
+#include "square.h"
+#include "serpent.h"
+#include "shacal2.h"
+#include "twofish.h"
+#include "blowfish.h"
+#include "camellia.h"
+#include "skipjack.h"
+
+#include "arc4.h"
+#include "salsa.h"
+#include "chacha.h"
+#include "rabbit.h"
+#include "sosemanuk.h"
+
+#include "modes.h"
+#include "cmac.h"
+#include "dmac.h"
+#include "hmac.h"
+
+#include "drbg.h"
#include <iostream>
#include <iomanip>
#include <sstream>
-#include "validate.h"
-
// Aggressive stack checking with VS2005 SP1 and above.
#if (_MSC_FULL_VER >= 140050727)
# pragma strict_gs_check (on)
#endif
#if CRYPTOPP_MSC_VERSION
-# pragma warning(disable: 4610 4510 4505 4355)
+# pragma warning(disable: 4505 4355)
#endif
NAMESPACE_BEGIN(CryptoPP)
NAMESPACE_BEGIN(Test)
-#ifndef CRYPTOPP_DISABLE_NACL
-
-USING_NAMESPACE(NaCl)
-
-bool TestCryptoBox()
-{
- // https://github.com/jedisct1/libsodium/blob/master/test/default/box.c
- const byte alicesk[32] = {
- 0x77, 0x07, 0x6d, 0x0a, 0x73, 0x18, 0xa5, 0x7d, 0x3c, 0x16, 0xc1,
- 0x72, 0x51, 0xb2, 0x66, 0x45, 0xdf, 0x4c, 0x2f, 0x87, 0xeb, 0xc0,
- 0x99, 0x2a, 0xb1, 0x77, 0xfb, 0xa5, 0x1d, 0xb9, 0x2c, 0x2a
- };
-
- const byte bobpk[32] = {
- 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, 0xd3, 0x5b, 0x61,
- 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, 0x78,
- 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f
- };
-
- const byte small_order_p[crypto_box_PUBLICKEYBYTES] = {
- 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, 0x16, 0x56, 0xe3,
- 0xfa, 0xf1, 0x9f, 0xc4, 0x6a, 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32,
- 0xb1, 0xfd, 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x00
- };
-
- const byte nonce[24] = {
- 0x69, 0x69, 0x6e, 0xe9, 0x55, 0xb6, 0x2b, 0x73, 0xcd, 0x62, 0xbd, 0xa8,
- 0x75, 0xfc, 0x73, 0xd6, 0x82, 0x19, 0xe0, 0x03, 0x6b, 0x7a, 0x0b, 0x37
- };
-
- /* API requires first 32 bytes to be 0 */
- const byte m[163] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0xbe, 0x07, 0x5f, 0xc5,
- 0x3c, 0x81, 0xf2, 0xd5, 0xcf, 0x14, 0x13, 0x16, 0xeb, 0xeb, 0x0c, 0x7b,
- 0x52, 0x28, 0xc5, 0x2a, 0x4c, 0x62, 0xcb, 0xd4, 0x4b, 0x66, 0x84, 0x9b,
- 0x64, 0x24, 0x4f, 0xfc, 0xe5, 0xec, 0xba, 0xaf, 0x33, 0xbd, 0x75, 0x1a,
- 0x1a, 0xc7, 0x28, 0xd4, 0x5e, 0x6c, 0x61, 0x29, 0x6c, 0xdc, 0x3c, 0x01,
- 0x23, 0x35, 0x61, 0xf4, 0x1d, 0xb6, 0x6c, 0xce, 0x31, 0x4a, 0xdb, 0x31,
- 0x0e, 0x3b, 0xe8, 0x25, 0x0c, 0x46, 0xf0, 0x6d, 0xce, 0xea, 0x3a, 0x7f,
- 0xa1, 0x34, 0x80, 0x57, 0xe2, 0xf6, 0x55, 0x6a, 0xd6, 0xb1, 0x31, 0x8a,
- 0x02, 0x4a, 0x83, 0x8f, 0x21, 0xaf, 0x1f, 0xde, 0x04, 0x89, 0x77, 0xeb,
- 0x48, 0xf5, 0x9f, 0xfd, 0x49, 0x24, 0xca, 0x1c, 0x60, 0x90, 0x2e, 0x52,
- 0xf0, 0xa0, 0x89, 0xbc, 0x76, 0x89, 0x70, 0x40, 0xe0, 0x82, 0xf9, 0x37,
- 0x76, 0x38, 0x48, 0x64, 0x5e, 0x07, 0x05
- };
-
- const byte exp1[] = {
- 0xf3,0xff,0xc7,0x70,0x3f,0x94,0x00,0xe5 ,0x2a,0x7d,0xfb,0x4b,0x3d,0x33,0x05,0xd9,
- 0x8e,0x99,0x3b,0x9f,0x48,0x68,0x12,0x73 ,0xc2,0x96,0x50,0xba,0x32,0xfc,0x76,0xce,
- 0x48,0x33,0x2e,0xa7,0x16,0x4d,0x96,0xa4 ,0x47,0x6f,0xb8,0xc5,0x31,0xa1,0x18,0x6a,
- 0xc0,0xdf,0xc1,0x7c,0x98,0xdc,0xe8,0x7b ,0x4d,0xa7,0xf0,0x11,0xec,0x48,0xc9,0x72,
- 0x71,0xd2,0xc2,0x0f,0x9b,0x92,0x8f,0xe2 ,0x27,0x0d,0x6f,0xb8,0x63,0xd5,0x17,0x38,
- 0xb4,0x8e,0xee,0xe3,0x14,0xa7,0xcc,0x8a ,0xb9,0x32,0x16,0x45,0x48,0xe5,0x26,0xae,
- 0x90,0x22,0x43,0x68,0x51,0x7a,0xcf,0xea ,0xbd,0x6b,0xb3,0x73,0x2b,0xc0,0xe9,0xda,
- 0x99,0x83,0x2b,0x61,0xca,0x01,0xb6,0xde ,0x56,0x24,0x4a,0x9e,0x88,0xd5,0xf9,0xb3,
- 0x79,0x73,0xf6,0x22,0xa4,0x3d,0x14,0xa6 ,0x59,0x9b,0x1f,0x65,0x4c,0xb4,0x5a,0x74,
- 0xe3,0x55,0xa5
- };
-
- const byte exp2[] = {
- 0xf3,0xff,0xc7,0x70,0x3f,0x94,0x00,0xe5 ,0x2a,0x7d,0xfb,0x4b,0x3d,0x33,0x05,0xd9,
- 0x8e,0x99,0x3b,0x9f,0x48,0x68,0x12,0x73 ,0xc2,0x96,0x50,0xba,0x32,0xfc,0x76,0xce,
- 0x48,0x33,0x2e,0xa7,0x16,0x4d,0x96,0xa4 ,0x47,0x6f,0xb8,0xc5,0x31,0xa1,0x18,0x6a,
- 0xc0,0xdf,0xc1,0x7c,0x98,0xdc,0xe8,0x7b ,0x4d,0xa7,0xf0,0x11,0xec,0x48,0xc9,0x72,
- 0x71,0xd2,0xc2,0x0f,0x9b,0x92,0x8f,0xe2 ,0x27,0x0d,0x6f,0xb8,0x63,0xd5,0x17,0x38,
- 0xb4,0x8e,0xee,0xe3,0x14,0xa7,0xcc,0x8a ,0xb9,0x32,0x16,0x45,0x48,0xe5,0x26,0xae,
- 0x90,0x22,0x43,0x68,0x51,0x7a,0xcf,0xea ,0xbd,0x6b,0xb3,0x73,0x2b,0xc0,0xe9,0xda,
- 0x99,0x83,0x2b,0x61,0xca,0x01,0xb6,0xde ,0x56,0x24,0x4a,0x9e,0x88,0xd5,0xf9,0xb3,
- 0x79,0x73,0xf6,0x22,0xa4,0x3d,0x14,0xa6 ,0x59,0x9b,0x1f,0x65,0x4c,0xb4,0x5a,0x74,
- 0xe3,0x55,0xa5
- };
-
- byte c[163];
- byte k[crypto_box_BEFORENMBYTES];
-
- bool pass = true; int rc;
-
- // Reject small order elements
-
- rc = crypto_box(c, m, 163, nonce, bobpk, alicesk);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(c+16, exp1, 163-16) == 0) && pass;
-
- rc = crypto_box(c, m, 163, nonce, small_order_p, alicesk);
- pass = (rc != 0) && pass;
- std::memset(c, 0, sizeof(c));
-
- rc = crypto_box_beforenm(k, bobpk, alicesk);
- pass = (rc == 0) && pass;
- rc = crypto_box_afternm(c, m, 163, nonce, k);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(c+16, exp2, 163-16) == 0) && pass;
-
- rc = crypto_box_beforenm(k, small_order_p, alicesk);
- pass = (rc != 0) && pass;
-
- // Allow small order elements
-
- rc = crypto_box_unchecked(c, m, 163, nonce, bobpk, alicesk);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(c+16, exp1, 163-16) == 0) && pass;
-
- rc = crypto_box_unchecked(c, m, 163, nonce, small_order_p, alicesk);
- pass = (rc == 0) && pass;
- std::memset(c, 0, sizeof(c));
-
- rc = crypto_box_beforenm_unchecked(k, bobpk, alicesk);
- pass = (rc == 0) && pass;
- rc = crypto_box_afternm(c, m, 163, nonce, k);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(c+16, exp2, 163-16) == 0) && pass;
-
- rc = crypto_box_beforenm_unchecked(k, small_order_p, alicesk);
- pass = (rc == 0) && pass;
-
- return pass;
-}
-
-bool TestCryptoBoxOpen()
-{
- // https://github.com/jedisct1/libsodium/blob/master/test/default/box2.c
- const byte bobsk[32] = {
- 0x5d, 0xab, 0x08, 0x7e, 0x62, 0x4a, 0x8a, 0x4b, 0x79, 0xe1, 0x7f, 0x8b, 0x83, 0x80,
- 0x0e, 0xe6, 0x6f, 0x3b, 0xb1, 0x29, 0x26, 0x18, 0xb6, 0xfd, 0x1c, 0x2f, 0x8b, 0x27,
- 0xff, 0x88, 0xe0, 0xeb
- };
-
- const byte alicepk[32] = {
- 0x85, 0x20, 0xf0, 0x09, 0x89, 0x30, 0xa7, 0x54, 0x74, 0x8b, 0x7d, 0xdc, 0xb4, 0x3e,
- 0xf7, 0x5a, 0x0d, 0xbf, 0x3a, 0x0d, 0x26, 0x38, 0x1a, 0xf4, 0xeb, 0xa4, 0xa9, 0x8e,
- 0xaa, 0x9b, 0x4e, 0x6a
- };
-
- static const byte small_order_p[crypto_box_PUBLICKEYBYTES] = {
- 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae, 0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f,
- 0xc4, 0x6a, 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd, 0x86, 0x62, 0x05, 0x16,
- 0x5f, 0x49, 0xb8, 0x00
- };
-
- const byte nonce[24] = {
- 0x69, 0x69, 0x6e, 0xe9, 0x55, 0xb6, 0x2b, 0x73, 0xcd, 0x62, 0xbd, 0xa8,
- 0x75, 0xfc, 0x73, 0xd6, 0x82, 0x19, 0xe0, 0x03, 0x6b, 0x7a, 0x0b, 0x37
- };
-
- /* API requires first 16 bytes to be 0 */
- const byte c[163] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0xf3, 0xff, 0xc7, 0x70, 0x3f, 0x94, 0x00, 0xe5,
- 0x2a, 0x7d, 0xfb, 0x4b, 0x3d, 0x33, 0x05, 0xd9, 0x8e, 0x99, 0x3b, 0x9f,
- 0x48, 0x68, 0x12, 0x73, 0xc2, 0x96, 0x50, 0xba, 0x32, 0xfc, 0x76, 0xce,
- 0x48, 0x33, 0x2e, 0xa7, 0x16, 0x4d, 0x96, 0xa4, 0x47, 0x6f, 0xb8, 0xc5,
- 0x31, 0xa1, 0x18, 0x6a, 0xc0, 0xdf, 0xc1, 0x7c, 0x98, 0xdc, 0xe8, 0x7b,
- 0x4d, 0xa7, 0xf0, 0x11, 0xec, 0x48, 0xc9, 0x72, 0x71, 0xd2, 0xc2, 0x0f,
- 0x9b, 0x92, 0x8f, 0xe2, 0x27, 0x0d, 0x6f, 0xb8, 0x63, 0xd5, 0x17, 0x38,
- 0xb4, 0x8e, 0xee, 0xe3, 0x14, 0xa7, 0xcc, 0x8a, 0xb9, 0x32, 0x16, 0x45,
- 0x48, 0xe5, 0x26, 0xae, 0x90, 0x22, 0x43, 0x68, 0x51, 0x7a, 0xcf, 0xea,
- 0xbd, 0x6b, 0xb3, 0x73, 0x2b, 0xc0, 0xe9, 0xda, 0x99, 0x83, 0x2b, 0x61,
- 0xca, 0x01, 0xb6, 0xde, 0x56, 0x24, 0x4a, 0x9e, 0x88, 0xd5, 0xf9, 0xb3,
- 0x79, 0x73, 0xf6, 0x22, 0xa4, 0x3d, 0x14, 0xa6, 0x59, 0x9b, 0x1f, 0x65,
- 0x4c, 0xb4, 0x5a, 0x74, 0xe3, 0x55, 0xa5
- };
-
- const byte exp1[] = {
- 0xbe,0x07,0x5f,0xc5,0x3c,0x81,0xf2,0xd5, 0xcf,0x14,0x13,0x16,0xeb,0xeb,0x0c,0x7b,
- 0x52,0x28,0xc5,0x2a,0x4c,0x62,0xcb,0xd4, 0x4b,0x66,0x84,0x9b,0x64,0x24,0x4f,0xfc,
- 0xe5,0xec,0xba,0xaf,0x33,0xbd,0x75,0x1a, 0x1a,0xc7,0x28,0xd4,0x5e,0x6c,0x61,0x29,
- 0x6c,0xdc,0x3c,0x01,0x23,0x35,0x61,0xf4, 0x1d,0xb6,0x6c,0xce,0x31,0x4a,0xdb,0x31,
- 0x0e,0x3b,0xe8,0x25,0x0c,0x46,0xf0,0x6d, 0xce,0xea,0x3a,0x7f,0xa1,0x34,0x80,0x57,
- 0xe2,0xf6,0x55,0x6a,0xd6,0xb1,0x31,0x8a, 0x02,0x4a,0x83,0x8f,0x21,0xaf,0x1f,0xde,
- 0x04,0x89,0x77,0xeb,0x48,0xf5,0x9f,0xfd, 0x49,0x24,0xca,0x1c,0x60,0x90,0x2e,0x52,
- 0xf0,0xa0,0x89,0xbc,0x76,0x89,0x70,0x40, 0xe0,0x82,0xf9,0x37,0x76,0x38,0x48,0x64,
- 0x5e,0x07,0x05
- };
-
- const byte exp2[] = {
- 0xbe,0x07,0x5f,0xc5,0x3c,0x81,0xf2,0xd5, 0xcf,0x14,0x13,0x16,0xeb,0xeb,0x0c,0x7b,
- 0x52,0x28,0xc5,0x2a,0x4c,0x62,0xcb,0xd4, 0x4b,0x66,0x84,0x9b,0x64,0x24,0x4f,0xfc,
- 0xe5,0xec,0xba,0xaf,0x33,0xbd,0x75,0x1a, 0x1a,0xc7,0x28,0xd4,0x5e,0x6c,0x61,0x29,
- 0x6c,0xdc,0x3c,0x01,0x23,0x35,0x61,0xf4, 0x1d,0xb6,0x6c,0xce,0x31,0x4a,0xdb,0x31,
- 0x0e,0x3b,0xe8,0x25,0x0c,0x46,0xf0,0x6d, 0xce,0xea,0x3a,0x7f,0xa1,0x34,0x80,0x57,
- 0xe2,0xf6,0x55,0x6a,0xd6,0xb1,0x31,0x8a, 0x02,0x4a,0x83,0x8f,0x21,0xaf,0x1f,0xde,
- 0x04,0x89,0x77,0xeb,0x48,0xf5,0x9f,0xfd, 0x49,0x24,0xca,0x1c,0x60,0x90,0x2e,0x52,
- 0xf0,0xa0,0x89,0xbc,0x76,0x89,0x70,0x40, 0xe0,0x82,0xf9,0x37,0x76,0x38,0x48,0x64,
- 0x5e,0x07,0x05
- };
-
- byte m[163];
- byte k[crypto_box_BEFORENMBYTES];
-
- bool pass = true; int rc;
-
- // Reject small order elements
-
- rc = crypto_box_open(m, c, 163, nonce, alicepk, bobsk);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(m+32, exp1, 163-32) == 0) && pass;
-
- rc = crypto_box_open(m, c, 163, nonce, small_order_p, bobsk);
- pass = (rc != 0) && pass;
-
- rc = crypto_box_beforenm(k, small_order_p, bobsk);
- pass = (rc != 0) && pass;
- rc = crypto_box_beforenm(k, alicepk, bobsk);
- pass = (rc == 0) && pass;
-
- rc = crypto_box_open_afternm(m, c, 163, nonce, k);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(m+32, exp2, 163-32) == 0) && pass;
-
- // Allow small order elements
-
- rc = crypto_box_open_unchecked(m, c, 163, nonce, alicepk, bobsk);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(m+32, exp1, 163-32) == 0) && pass;
-
- rc = crypto_box_beforenm_unchecked(k, small_order_p, bobsk);
- pass = (rc == 0) && pass;
- rc = crypto_box_beforenm_unchecked(k, alicepk, bobsk);
- pass = (rc == 0) && pass;
-
- rc = crypto_box_open_afternm(m, c, 163, nonce, k);
- pass = (rc == 0) && pass;
- pass = (std::memcmp(m+32, exp2, 163-32) == 0) && pass;
-
- return pass;
-}
-
-bool TestCryptoBoxKeys()
-{
- // https://github.com/jedisct1/libsodium/blob/master/test/default/box7.c
- const unsigned int MAX_TEST = 64;
- const unsigned int MAX_MESSAGE = 4096;
-
- byte alicesk[crypto_box_SECRETKEYBYTES];
- byte alicepk[crypto_box_PUBLICKEYBYTES];
- byte bobsk[crypto_box_SECRETKEYBYTES];
- byte bobpk[crypto_box_PUBLICKEYBYTES];
-
- // byte m[MAX_MESSAGE+32];
- // byte c[MAX_MESSAGE+32];
- // byte r[MAX_MESSAGE+32];
-
- bool pass = true, fail; int rc;
- for (unsigned int i=0; i < MAX_TEST; ++i)
- {
- fail = (crypto_box_keypair(alicepk, alicesk) != 0);
- pass = !fail && pass;
- fail = (crypto_box_keypair(bobpk, bobsk) != 0);
- pass = !fail && pass;
-
- SecByteBlock m, c, r, n;
- const word32 len = (i == 0 ? 0 : GlobalRNG().GenerateWord32(1, MAX_MESSAGE));
-
- m.New(len+crypto_box_ZEROBYTES);
- c.New(len+crypto_box_BOXZEROBYTES+crypto_box_MACBYTES);
- r.New(len+crypto_box_ZEROBYTES);
- n.New(crypto_box_NONCEBYTES);
-
- GlobalRNG().GenerateBlock(m+crypto_box_ZEROBYTES, len);
- GlobalRNG().GenerateBlock(n, crypto_box_NONCEBYTES);
-
- std::memset(m, 0x00, crypto_box_ZEROBYTES);
- rc = crypto_box(c, m, len + crypto_box_ZEROBYTES, n, bobpk, alicesk);
- fail = (rc != 0); pass = !fail && pass;
-
- std::memset(c, 0x00, crypto_box_BOXZEROBYTES);
- rc = crypto_box_open(r, c, len + crypto_box_BOXZEROBYTES + crypto_box_MACBYTES, n, alicepk, bobsk);
- fail = (rc != 0); pass = !fail && pass;
- fail = std::memcmp(m+crypto_box_ZEROBYTES, r+crypto_box_ZEROBYTES, len) != 0;
- pass = !fail && pass;
+bool ValidateHmacDRBG()
+{
+ std::cout << "\nTesting NIST HMAC DRBGs...\n\n";
+ bool pass=true, fail;
+
+ // # CAVS 14.3
+ // # DRBG800-90A information for "drbg_pr"
+ // # Generated on Tue Apr 02 15:32:12 2013
+
+ {
+ // [SHA-1], [PredictionResistance = False], [EntropyInputLen = 128], [NonceLen = 64]
+ // [PersonalizationStringLen = 0], [AdditionalInputLen = 0], [ReturnedBitsLen = 640]
+ const byte entropy1[] = "\x79\x34\x9b\xbf\x7c\xdd\xa5\x79\x95\x57\x86\x66\x21\xc9\x13\x83";
+ const byte entropy2[] = "\xc7\x21\x5b\x5b\x96\xc4\x8e\x9b\x33\x8c\x74\xe3\xe9\x9d\xfe\xdf";
+ const byte nonce[] = "\x11\x46\x73\x3a\xbf\x8c\x35\xc8";
+
+ HMAC_DRBG<SHA1, 128/8, 440/8> drbg(entropy1, 16, nonce, 8);
+ drbg.IncorporateEntropy(entropy2, 16);
+
+ SecByteBlock result(80);
+ drbg.GenerateBlock(result, result.size());
+ drbg.GenerateBlock(result, result.size());
+
+ const byte expected[] = "\xc6\xa1\x6a\xb8\xd4\x20\x70\x6f\x0f\x34\xab\x7f\xec\x5a\xdc\xa9\xd8\xca\x3a\x13"
+ "\x3e\x15\x9c\xa6\xac\x43\xc6\xf8\xa2\xbe\x22\x83\x4a\x4c\x0a\x0a\xff\xb1\x0d\x71"
+ "\x94\xf1\xc1\xa5\xcf\x73\x22\xec\x1a\xe0\x96\x4e\xd4\xbf\x12\x27\x46\xe0\x87\xfd"
+ "\xb5\xb3\xe9\x1b\x34\x93\xd5\xbb\x98\xfa\xed\x49\xe8\x5f\x13\x0f\xc8\xa4\x59\xb7";
+
+ fail = !!memcmp(result, expected, 640/8);
+ pass = !fail && pass;
+
+ std::cout << (fail ? "FAILED " : "passed ") << "HMAC_DRBG SHA1/128/440 (COUNT=0, E=16, N=8)\n";
+ }
+
+ {
+ // [SHA-1], [PredictionResistance = False], [EntropyInputLen = 128], [NonceLen = 64]
+ // [PersonalizationStringLen = 0], [AdditionalInputLen = 0], [ReturnedBitsLen = 640]
+ const byte entropy1[] = "\xee\x57\xfc\x23\x60\x0f\xb9\x02\x9a\x9e\xc6\xc8\x2e\x7b\x51\xe4";
+ const byte entropy2[] = "\x84\x1d\x27\x6c\xa9\x51\x90\x61\xd9\x2d\x7d\xdf\xa6\x62\x8c\xa3";
+ const byte nonce[] = "\x3e\x97\x21\xe4\x39\x3e\xf9\xad";
+
+ HMAC_DRBG<SHA1, 128/8, 440/8> drbg(entropy1, 16, nonce, 8);
+ drbg.IncorporateEntropy(entropy2, 16);
+
+ SecByteBlock result(80);
+ drbg.GenerateBlock(result, result.size());
+ drbg.GenerateBlock(result, result.size());
+
+ const byte expected[] = "\xee\x26\xa5\xc8\xef\x08\xa1\xca\x8f\x14\x15\x4d\x67\xc8\x8f\x5e\x7e\xd8\x21\x9d"
+ "\x93\x1b\x98\x42\xac\x00\x39\xf2\x14\x55\x39\xf2\x14\x2b\x44\x11\x7a\x99\x8c\x22"
+ "\xf5\x90\xf6\xc9\xb3\x8b\x46\x5b\x78\x3e\xcf\xf1\x3a\x77\x50\x20\x1f\x7e\xcf\x1b"
+ "\x8a\xb3\x93\x60\x4c\x73\xb2\x38\x93\x36\x60\x9a\xf3\x44\x0c\xde\x43\x29\x8b\x84";
+
+ fail = !!memcmp(result, expected, 640/8);
+ pass = !fail && pass;
+
+ std::cout << (fail ? "FAILED " : "passed ") << "HMAC_DRBG SHA1/128/440 (COUNT=1, E=16, N=8)\n";
+ }
+
+ // *****************************************************
+
+ {
+ // [SHA-1], [PredictionResistance = False], [EntropyInputLen = 128], [NonceLen = 64]
+ // [PersonalizationStringLen = 0], [AdditionalInputLen = 16], [ReturnedBitsLen = 640]
+ const byte entropy1[] = "\x7d\x70\x52\xa7\x76\xfd\x2f\xb3\xd7\x19\x1f\x73\x33\x04\xee\x8b";
+ const byte entropy2[] = "\x49\x04\x7e\x87\x9d\x61\x09\x55\xee\xd9\x16\xe4\x06\x0e\x00\xc9";
+ const byte nonce[] = "\xbe\x4a\x0c\xee\xdc\xa8\x02\x07";
+ const byte additional1[] = "\xfd\x8b\xb3\x3a\xab\x2f\x6c\xdf\xbc\x54\x18\x11\x86\x1d\x51\x8d";
+ const byte additional2[] = "\x99\xaf\xe3\x47\x54\x04\x61\xdd\xf6\xab\xeb\x49\x1e\x07\x15\xb4";
+ const byte additional3[] = "\x02\xf7\x73\x48\x2d\xd7\xae\x66\xf7\x6e\x38\x15\x98\xa6\x4e\xf0";
+
+ HMAC_DRBG<SHA1, 128/8, 440/8> drbg(entropy1, 16, nonce, 8);
+ drbg.IncorporateEntropy(entropy2, 16, additional1, 16);
+
+ SecByteBlock result(80);
+ drbg.GenerateBlock(additional2, 16, result, result.size());
+ drbg.GenerateBlock(additional3, 16, result, result.size());
+
+ const byte expected[] = "\xa7\x36\x34\x38\x44\xfc\x92\x51\x13\x91\xdb\x0a\xdd\xd9\x06\x4d\xbe\xe2\x4c\x89"
+ "\x76\xaa\x25\x9a\x9e\x3b\x63\x68\xaa\x6d\xe4\xc9\xbf\x3a\x0e\xff\xcd\xa9\xcb\x0e"
+ "\x9d\xc3\x36\x52\xab\x58\xec\xb7\x65\x0e\xd8\x04\x67\xf7\x6a\x84\x9f\xb1\xcf\xc1"
+ "\xed\x0a\x09\xf7\x15\x50\x86\x06\x4d\xb3\x24\xb1\xe1\x24\xf3\xfc\x9e\x61\x4f\xcb";
+
+ fail = !!memcmp(result, expected, 640/8);
+ pass = !fail && pass;
+
+ std::cout << (fail ? "FAILED " : "passed ") << "HMAC_DRBG SHA1/128/440 (COUNT=0, E=16, N=8, A=16)\n";
+ }
+
+ {
+ // [SHA-1], [PredictionResistance = False], [EntropyInputLen = 128], [NonceLen = 64]
+ // [PersonalizationStringLen = 0], [AdditionalInputLen = 16], [ReturnedBitsLen = 640]
+ const byte entropy1[] = "\x29\xc6\x2a\xfa\x3c\x52\x20\x8a\x3f\xde\xcb\x43\xfa\x61\x3f\x15";
+ const byte entropy2[] = "\xbd\x87\xbe\x99\xd1\x84\x16\x54\x12\x31\x41\x40\xd4\x02\x71\x41";
+ const byte nonce[] = "\x6c\x9e\xb5\x9a\xc3\xc2\xd4\x8b";
+ const byte additional1[] = "\x43\x3d\xda\xf2\x59\xd1\x4b\xcf\x89\x76\x30\xcc\xaa\x27\x33\x8c";
+ const byte additional2[] = "\x14\x11\x46\xd4\x04\xf2\x84\xc2\xd0\x2b\x6a\x10\x15\x6e\x33\x82";
+ const byte additional3[] = "\xed\xc3\x43\xdb\xff\xe7\x1a\xb4\x11\x4a\xc3\x63\x9d\x44\x5b\x65";
+
+ HMAC_DRBG<SHA1, 128/8, 440/8> drbg(entropy1, 16, nonce, 8);
+ drbg.IncorporateEntropy(entropy2, 16, additional1, 16);
+
+ SecByteBlock result(80);
+ drbg.GenerateBlock(additional2, 16, result, result.size());
+ drbg.GenerateBlock(additional3, 16, result, result.size());
+
+ const byte expected[] = "\x8c\x73\x0f\x05\x26\x69\x4d\x5a\x9a\x45\xdb\xab\x05\x7a\x19\x75\x35\x7d\x65\xaf"
+ "\xd3\xef\xf3\x03\x32\x0b\xd1\x40\x61\xf9\xad\x38\x75\x91\x02\xb6\xc6\x01\x16\xf6"
+ "\xdb\x7a\x6e\x8e\x7a\xb9\x4c\x05\x50\x0b\x4d\x1e\x35\x7d\xf8\xe9\x57\xac\x89\x37"
+ "\xb0\x5f\xb3\xd0\x80\xa0\xf9\x06\x74\xd4\x4d\xe1\xbd\x6f\x94\xd2\x95\xc4\x51\x9d";
+
+ fail = !!memcmp(result, expected, 640/8);
+ pass = !fail && pass;
+
+ std::cout << (fail ? "FAILED " : "passed ") << "HMAC_DRBG SHA1/128/440 (COUNT=1, E=16, N=8, A=16)\n";
+ }
+
+ return pass;
+}
- m.SetMark(16); c.SetMark(16); r.SetMark(16);
- }
+class CipherFactory
+{
+public:
+ virtual unsigned int BlockSize() const =0;
+ virtual unsigned int KeyLength() const =0;
- return pass;
-}
+ virtual BlockTransformation* NewEncryption(const byte *keyStr) const =0;
+ virtual BlockTransformation* NewDecryption(const byte *keyStr) const =0;
+};
-struct TestData {
- const byte sk[crypto_sign_SEEDBYTES];
- const byte pk[crypto_sign_PUBLICKEYBYTES];
- const byte sig[crypto_sign_BYTES];
- const word32 len;
- const char* msg;
+template <class E, class D> class FixedRoundsCipherFactory : public CipherFactory
+{
+public:
+ FixedRoundsCipherFactory(unsigned int keylen=0) :
+ m_keylen(keylen ? keylen : static_cast<unsigned int>(E::DEFAULT_KEYLENGTH)) {}
+
+ unsigned int BlockSize() const {return E::BLOCKSIZE;}
+ unsigned int KeyLength() const {return m_keylen;}
+
+ BlockTransformation* NewEncryption(const byte *keyStr) const
+ {return new E(keyStr, m_keylen);}
+ BlockTransformation* NewDecryption(const byte *keyStr) const
+ {return new D(keyStr, m_keylen);}
+
+ unsigned int m_keylen;
};
-// https://github.com/jedisct1/libsodium/blob/master/test/default/sign.c
-const TestData test_data[] = {
- {{0x9d,0x61,0xb1,0x9d,0xef,0xfd,0x5a,0x60,0xba,0x84,0x4a,0xf4,0x92,0xec,0x2c,0xc4,0x44,0x49,0xc5,0x69,0x7b,0x32,0x69,0x19,0x70,0x3b,0xac,0x03,0x1c,0xae,0x7f,0x60,},{0xd7,0x5a,0x98,0x01,0x82,0xb1,0x0a,0xb7,0xd5,0x4b,0xfe,0xd3,0xc9,0x64,0x07,0x3a,0x0e,0xe1,0x72,0xf3,0xda,0xa6,0x23,0x25,0xaf,0x02,0x1a,0x68,0xf7,0x07,0x51,0x1a,},{0xe5,0x56,0x43,0x00,0xc3,0x60,0xac,0x72,0x90,0x86,0xe2,0xcc,0x80,0x6e,0x82,0x8a,0x84,0x87,0x7f,0x1e,0xb8,0xe5,0xd9,0x74,0xd8,0x73,0xe0,0x65,0x22,0x49,0x01,0x55,0x5f,0xb8,0x82,0x15,0x90,0xa3,0x3b,0xac,0xc6,0x1e,0x39,0x70,0x1c,0xf9,0xb4,0x6b,0xd2,0x5b,0xf5,0xf0,0x59,0x5b,0xbe,0x24,0x65,0x51,0x41,0x43,0x8e,0x7a,0x10,0x0b,},0,""},
- {{0x4c,0xcd,0x08,0x9b,0x28,0xff,0x96,0xda,0x9d,0xb6,0xc3,0x46,0xec,0x11,0x4e,0x0f,0x5b,0x8a,0x31,0x9f,0x35,0xab,0xa6,0x24,0xda,0x8c,0xf6,0xed,0x4f,0xb8,0xa6,0xfb,},{0x3d,0x40,0x17,0xc3,0xe8,0x43,0x89,0x5a,0x92,0xb7,0x0a,0xa7,0x4d,0x1b,0x7e,0xbc,0x9c,0x98,0x2c,0xcf,0x2e,0xc4,0x96,0x8c,0xc0,0xcd,0x55,0xf1,0x2a,0xf4,0x66,0x0c,},{0x92,0xa0,0x09,0xa9,0xf0,0xd4,0xca,0xb8,0x72,0x0e,0x82,0x0b,0x5f,0x64,0x25,0x40,0xa2,0xb2,0x7b,0x54,0x16,0x50,0x3f,0x8f,0xb3,0x76,0x22,0x23,0xeb,0xdb,0x69,0xda,0x08,0x5a,0xc1,0xe4,0x3e,0x15,0x99,0x6e,0x45,0x8f,0x36,0x13,0xd0,0xf1,0x1d,0x8c,0x38,0x7b,0x2e,0xae,0xb4,0x30,0x2a,0xee,0xb0,0x0d,0x29,0x16,0x12,0xbb,0x0c,0x00,},1,"\x72"},
- {{0xc5,0xaa,0x8d,0xf4,0x3f,0x9f,0x83,0x7b,0xed,0xb7,0x44,0x2f,0x31,0xdc,0xb7,0xb1,0x66,0xd3,0x85,0x35,0x07,0x6f,0x09,0x4b,0x85,0xce,0x3a,0x2e,0x0b,0x44,0x58,0xf7,},{0xfc,0x51,0xcd,0x8e,0x62,0x18,0xa1,0xa3,0x8d,0xa4,0x7e,0xd0,0x02,0x30,0xf0,0x58,0x08,0x16,0xed,0x13,0xba,0x33,0x03,0xac,0x5d,0xeb,0x91,0x15,0x48,0x90,0x80,0x25,},{0x62,0x91,0xd6,0x57,0xde,0xec,0x24,0x02,0x48,0x27,0xe6,0x9c,0x3a,0xbe,0x01,0xa3,0x0c,0xe5,0x48,0xa2,0x84,0x74,0x3a,0x44,0x5e,0x36,0x80,0xd7,0xdb,0x5a,0xc3,0xac,0x18,0xff,0x9b,0x53,0x8d,0x16,0xf2,0x90,0xae,0x67,0xf7,0x60,0x98,0x4d,0xc6,0x59,0x4a,0x7c,0x15,0xe9,0x71,0x6e,0xd2,0x8d,0xc0,0x27,0xbe,0xce,0xea,0x1e,0xc4,0x0a,},2,"\xaf\x82"},
- {{0x0d,0x4a,0x05,0xb0,0x73,0x52,0xa5,0x43,0x6e,0x18,0x03,0x56,0xda,0x0a,0xe6,0xef,0xa0,0x34,0x5f,0xf7,0xfb,0x15,0x72,0x57,0x57,0x72,0xe8,0x00,0x5e,0xd9,0x78,0xe9,},{0xe6,0x1a,0x18,0x5b,0xce,0xf2,0x61,0x3a,0x6c,0x7c,0xb7,0x97,0x63,0xce,0x94,0x5d,0x3b,0x24,0x5d,0x76,0x11,0x4d,0xd4,0x40,0xbc,0xf5,0xf2,0xdc,0x1a,0xa5,0x70,0x57,},{0xd9,0x86,0x8d,0x52,0xc2,0xbe,0xbc,0xe5,0xf3,0xfa,0x5a,0x79,0x89,0x19,0x70,0xf3,0x09,0xcb,0x65,0x91,0xe3,0xe1,0x70,0x2a,0x70,0x27,0x6f,0xa9,0x7c,0x24,0xb3,0xa8,0xe5,0x86,0x06,0xc3,0x8c,0x97,0x58,0x52,0x9d,0xa5,0x0e,0xe3,0x1b,0x82,0x19,0xcb,0xa4,0x52,0x71,0xc6,0x89,0xaf,0xa6,0x0b,0x0e,0xa2,0x6c,0x99,0xdb,0x19,0xb0,0x0c,},3,"\xcb\xc7\x7b"},
- {{0x6d,0xf9,0x34,0x0c,0x13,0x8c,0xc1,0x88,0xb5,0xfe,0x44,0x64,0xeb,0xaa,0x3f,0x7f,0xc2,0x06,0xa2,0xd5,0x5c,0x34,0x34,0x70,0x7e,0x74,0xc9,0xfc,0x04,0xe2,0x0e,0xbb,},{0xc0,0xda,0xc1,0x02,0xc4,0x53,0x31,0x86,0xe2,0x5d,0xc4,0x31,0x28,0x47,0x23,0x53,0xea,0xab,0xdb,0x87,0x8b,0x15,0x2a,0xeb,0x8e,0x00,0x1f,0x92,0xd9,0x02,0x33,0xa7,},{0x12,0x4f,0x6f,0xc6,0xb0,0xd1,0x00,0x84,0x27,0x69,0xe7,0x1b,0xd5,0x30,0x66,0x4d,0x88,0x8d,0xf8,0x50,0x7d,0xf6,0xc5,0x6d,0xed,0xfd,0xb5,0x09,0xae,0xb9,0x34,0x16,0xe2,0x6b,0x91,0x8d,0x38,0xaa,0x06,0x30,0x5d,0xf3,0x09,0x56,0x97,0xc1,0x8b,0x2a,0xa8,0x32,0xea,0xa5,0x2e,0xdc,0x0a,0xe4,0x9f,0xba,0xe5,0xa8,0x5e,0x15,0x0c,0x07,},4,"\x5f\x4c\x89\x89"},
- {{0xb7,0x80,0x38,0x1a,0x65,0xed,0xf8,0xb7,0x8f,0x69,0x45,0xe8,0xdb,0xec,0x79,0x41,0xac,0x04,0x9f,0xd4,0xc6,0x10,0x40,0xcf,0x0c,0x32,0x43,0x57,0x97,0x5a,0x29,0x3c,},{0xe2,0x53,0xaf,0x07,0x66,0x80,0x4b,0x86,0x9b,0xb1,0x59,0x5b,0xe9,0x76,0x5b,0x53,0x48,0x86,0xbb,0xaa,0xb8,0x30,0x5b,0xf5,0x0d,0xbc,0x7f,0x89,0x9b,0xfb,0x5f,0x01,},{0xb2,0xfc,0x46,0xad,0x47,0xaf,0x46,0x44,0x78,0xc1,0x99,0xe1,0xf8,0xbe,0x16,0x9f,0x1b,0xe6,0x32,0x7c,0x7f,0x9a,0x0a,0x66,0x89,0x37,0x1c,0xa9,0x4c,0xaf,0x04,0x06,0x4a,0x01,0xb2,0x2a,0xff,0x15,0x20,0xab,0xd5,0x89,0x51,0x34,0x16,0x03,0xfa,0xed,0x76,0x8c,0xf7,0x8c,0xe9,0x7a,0xe7,0xb0,0x38,0xab,0xfe,0x45,0x6a,0xa1,0x7c,0x09,},5,"\x18\xb6\xbe\xc0\x97"},
- {{0x78,0xae,0x9e,0xff,0xe6,0xf2,0x45,0xe9,0x24,0xa7,0xbe,0x63,0x04,0x11,0x46,0xeb,0xc6,0x70,0xdb,0xd3,0x06,0x0c,0xba,0x67,0xfb,0xc6,0x21,0x6f,0xeb,0xc4,0x45,0x46,},{0xfb,0xcf,0xbf,0xa4,0x05,0x05,0xd7,0xf2,0xbe,0x44,0x4a,0x33,0xd1,0x85,0xcc,0x54,0xe1,0x6d,0x61,0x52,0x60,0xe1,0x64,0x0b,0x2b,0x50,0x87,0xb8,0x3e,0xe3,0x64,0x3d,},{0x6e,0xd6,0x29,0xfc,0x1d,0x9c,0xe9,0xe1,0x46,0x87,0x55,0xff,0x63,0x6d,0x5a,0x3f,0x40,0xa5,0xd9,0xc9,0x1a,0xfd,0x93,0xb7,0x9d,0x24,0x18,0x30,0xf7,0xe5,0xfa,0x29,0x85,0x4b,0x8f,0x20,0xcc,0x6e,0xec,0xbb,0x24,0x8d,0xbd,0x8d,0x16,0xd1,0x4e,0x99,0x75,0x21,0x94,0xe4,0x90,0x4d,0x09,0xc7,0x4d,0x63,0x95,0x18,0x83,0x9d,0x23,0x00,},6,"\x89\x01\x0d\x85\x59\x72"},
- {{0x69,0x18,0x65,0xbf,0xc8,0x2a,0x1e,0x4b,0x57,0x4e,0xec,0xde,0x4c,0x75,0x19,0x09,0x3f,0xaf,0x0c,0xf8,0x67,0x38,0x02,0x34,0xe3,0x66,0x46,0x45,0xc6,0x1c,0x5f,0x79,},{0x98,0xa5,0xe3,0xa3,0x6e,0x67,0xaa,0xba,0x89,0x88,0x8b,0xf0,0x93,0xde,0x1a,0xd9,0x63,0xe7,0x74,0x01,0x3b,0x39,0x02,0xbf,0xab,0x35,0x6d,0x8b,0x90,0x17,0x8a,0x63,},{0x6e,0x0a,0xf2,0xfe,0x55,0xae,0x37,0x7a,0x6b,0x7a,0x72,0x78,0xed,0xfb,0x41,0x9b,0xd3,0x21,0xe0,0x6d,0x0d,0xf5,0xe2,0x70,0x37,0xdb,0x88,0x12,0xe7,0xe3,0x52,0x98,0x10,0xfa,0x55,0x52,0xf6,0xc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xfb,0x5e,0x14,0x64,0x06,0x2e,0x6d,0x6c,0x62,0x19,0x15,0x5e,0xfd,},{0x2c,0x76,0xa0,0x4a,0xf2,0x39,0x1c,0x14,0x70,0x82,0xe3,0x3f,0xaa,0xcd,0xbe,0x56,0x64,0x2a,0x1e,0x13,0x4b,0xd3,0x88,0x62,0x0b,0x85,0x2b,0x90,0x1a,0x6b,0xc1,0x6f,0xf6,0xc9,0xcc,0x94,0x04,0xc4,0x1d,0xea,0x12,0xed,0x28,0x1d,0xa0,0x67,0xa1,0x51,0x38,0x66,0xf9,0xd9,0x64,0xf8,0xbd,0xd2,0x49,0x53,0x85,0x6c,0x50,0x04,0x29,0x01,},9,"\x67\x2b\xf8\x96\x5d\x04\xbc\x51\x46"},
- {{0x4e,0x7d,0x21,0xfb,0x3b,0x18,0x97,0x57,0x1a,0x44,0x58,0x33,0xbe,0x0f,0x9f,0xd4,0x1c,0xd6,0x2b,0xe3,0xaa,0x04,0x04,0x0f,0x89,0x34,0xe1,0xfc,0xbd,0xca,0xcd,0x45,},{0x31,0xb2,0x52,0x4b,0x83,0x48,0xf7,0xab,0x1d,0xfa,0xfa,0x67,0x5c,0xc5,0x38,0xe9,0xa8,0x4e,0x3f,0xe5,0x81,0x9e,0x27,0xc1,0x2a,0xd8,0xbb,0xc1,0xa3,0x6e,0x4d,0xff,},{0x28,0xe4,0x59,0x8c,0x41,0x5a,0xe9,0xde,0x01,0xf0,0x3f,0x9f,0x3f,0xab,0x4e,0x91,0x9e,0x8b,0xf5,0x37,0xdd,0x2b,0x0c,0xdf,0x6e,0x79,0xb9,0xe6,0x55,0x9c,0x94,0x09,0xd9,0x15,0x1a,0x4c,0x40,0xf0,0x83,0x19,0x39,0x37,0x62,0x7c,0x36,0x94,0x88,0x25,0x9e,0x99,0xda,0x5a,0x9f,0x0a,0x87,0x49,0x7f,0xa6,0x69,0x6a,0x5d,0xd6,0xce,0x08,},10,"\x33\xd7\xa7\x86\xad\xed\x8c\x1b\xf6\x91"},
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,0xb2,0x02,0x29,0x2d,0x69,0x16,0xa7,0x38,},{0xcf,0x3a,0xf8,0x98,0x46,0x7a,0x5b,0x7a,0x52,0xd3,0x3d,0x53,0xbc,0x03,0x7e,0x26,0x42,0xa8,0xda,0x99,0x69,0x03,0xfc,0x25,0x22,0x17,0xe9,0xc0,0x33,0xe2,0xf2,0x91,},{0x6e,0xe3,0xfe,0x81,0xe2,0x3c,0x60,0xeb,0x23,0x12,0xb2,0x00,0x6b,0x3b,0x25,0xe6,0x83,0x8e,0x02,0x10,0x66,0x23,0xf8,0x44,0xc4,0x4e,0xdb,0x8d,0xaf,0xd6,0x6a,0xb0,0x67,0x10,0x87,0xfd,0x19,0x5d,0xf5,0xb8,0xf5,0x8a,0x1d,0x6e,0x52,0xaf,0x42,0x90,0x80,0x53,0xd5,0x5c,0x73,0x21,0x01,0x00,0x92,0x74,0x87,0x95,0xef,0x94,0xcf,0x06,},14,"\x55\xc7\xfa\x43\x4f\x5e\xd8\xcd\xec\x2b\x7a\xea\xc1\x73"},
- {{0xd5,0xae,0xee,0x41,0xee,0xb0,0xe9,0xd1,0xbf,0x83,0x37,0xf9,0x39,0x58,0x7e,0xbe,0x29,0x61,0x61,0xe6,0xbf,0x52,0x09,0xf5,0x91,0xec,0x93,0x9e,0x14,0x40,0xc3,0x00,},{0xfd,0x2a,0x56,0x57,0x23,0x16,0x3e,0x29,0xf5,0x3c,0x9d,0xe3,0xd5,0xe8,0xfb,0xe3,0x6a,0x7a,0xb6,0x6e,0x14,0x39,0xec,0x4e,0xae,0x9c,0x0a,0x60,0x4a,0xf2,0x91,0xa5,},{0xf6,0x8d,0x04,0x84,0x7e,0x5b,0x24,0x97,0x37,0x89,0x9c,0x01,0x4d,0x31,0xc8,0x05,0xc5,0x00,0x7a,0x62,0xc0,0xa1,0x0d,0x50,0xbb,0x15,0x38,0xc5,0xf3,0x55,0x03,0x95,0x1f,0xbc,0x1e,0x08,0x68,0x2f,0x2c,0xc0,0xc9,0x2e,0xfe,0x8f,0x49,0x85,0xde,0xc6,0x1d,0xcb,0xd5,0x4d,0x4b,0x94,0xa2,0x25,0x47,0xd2,0x44,0x51,0x27,0x1c,0x8b,0x00,},15,"\x0a\x68\x8e\x79\xbe\x24\xf8\x66\x28\x6d\x46\x46\xb5\xd8\x1c"},
- {{0x0a,0x47,0xd1,0x04,0x52,0xae,0x2f,0xeb,0xec,0x51,0x8a,0x1c,0x7c,0x36,0x28,0x90,0xc3,0xfc,0x1a,0x49,0xd3,0x4b,0x03,0xb6,0x46,0x7d,0x35,0xc9,0x04,0xa8,0x36,0x2d,},{0x34,0xe5,0xa8,0x50,0x8c,0x47,0x43,0x74,0x69,0x62,0xc0,0x66,0xe4,0xba,0xde,0xa2,0x20,0x1b,0x8a,0xb4,0x84,0xde,0x5c,0x4f,0x94,0x47,0x6c,0xcd,0x21,0x43,0x95,0x5b,},{0x2a,0x3d,0x27,0xdc,0x40,0xd0,0xa8,0x12,0x79,0x49,0xa3,0xb7,0xf9,0x08,0xb3,0x68,0x8f,0x63,0xb7,0xf1,0x4f,0x65,0x1a,0xac,0xd7,0x15,0x94,0x0b,0xdb,0xe2,0x7a,0x08,0x09,0xaa,0xc1,0x42,0xf4,0x7a,0xb0,0xe1,0xe4,0x4f,0xa4,0x90,0xba,0x87,0xce,0x53,0x92,0xf3,0x3a,0x89,0x15,0x39,0xca,0xf1,0xef,0x4c,0x36,0x7c,0xae,0x54,0x50,0x0c,},16,"\xc9\x42\xfa\x7a\xc6\xb2\x3a\xb7\xff\x61\x2f\xdc\x8e\x68\xef\x39"},
- {{0xf8,0x14,0x8f,0x75,0x06,0xb7,0x75,0xef,0x46,0xfd,0xc8,0xe8,0xc7,0x56,0x51,0x68,0x12,0xd4,0x7d,0x6c,0xfb,0xfa,0x31,0x8c,0x27,0xc9,0xa2,0x26,0x41,0xe5,0x6f,0x17,},{0x04,0x45,0xe4,0x56,0xda,0xcc,0x7d,0x5b,0x0b,0xbe,0xd2,0x3c,0x82,0x00,0xcd,0xb7,0x4b,0xdc,0xb0,0x3e,0x4c,0x7b,0x73,0xf0,0xa2,0xb9,0xb4,0x6e,0xac,0x5d,0x43,0x72,},{0x36,0x53,0xcc,0xb2,0x12,0x19,0x20,0x2b,0x84,0x36,0xfb,0x41,0xa3,0x2b,0xa2,0x61,0x8c,0x4a,0x13,0x34,0x31,0xe6,0xe6,0x34,0x63,0xce,0xb3,0xb6,0x10,0x6c,0x4d,0x56,0xe1,0xd2,0xba,0x16,0x5b,0xa7,0x6e,0xaa,0xd3,0xdc,0x39,0xbf,0xfb,0x13,0x0f,0x1d,0xe3,0xd8,0xe6,0x42,0x7d,0xb5,0xb7,0x19,0x38,0xdb,0x4e,0x27,0x2b,0xc3,0xe2,0x0b,},17,"\x73\x68\x72\x4a\x5b\x0e\xfb\x57\xd2\x8d\x97\x62\x2d\xbd\xe7\x25\xaf"},
- {{0x77,0xf8,0x86,0x91,0xc4,0xef,0xf2,0x3e,0xbb,0x73,0x64,0x94,0x70,0x92,0x95,0x1a,0x5f,0xf3,0xf1,0x07,0x85,0xb4,0x17,0xe9,0x18,0x82,0x3a,0x55,0x2d,0xab,0x7c,0x75,},{0x74,0xd2,0x91,0x27,0xf1,0x99,0xd8,0x6a,0x86,0x76,0xae,0xc3,0x3b,0x4c,0xe3,0xf2,0x25,0xcc,0xb1,0x91,0xf5,0x2c,0x19,0x1c,0xcd,0x1e,0x8c,0xca,0x65,0x21,0x3a,0x6b,},{0xfb,0xe9,0x29,0xd7,0x43,0xa0,0x3c,0x17,0x91,0x05,0x75,0x49,0x2f,0x30,0x92,0xee,0x2a,0x2b,0xf1,0x4a,0x60,0xa3,0xfc,0xac,0xec,0x74,0xa5,0x8c,0x73,0x34,0x51,0x0f,0xc2,0x62,0xdb,0x58,0x27,0x91,0x32,0x2d,0x6c,0x8c,0x41,0xf1,0x70,0x0a,0xdb,0x80,0x02,0x7e,0xca,0xbc,0x14,0x27,0x0b,0x70,0x34,0x44,0xae,0x3e,0xe7,0x62,0x3e,0x0a,},18,"\xbd\x8e\x05\x03\x3f\x3a\x8b\xcd\xcb\xf4\xbe\xce\xb7\x09\x01\xc8\x2e\x31"},
- {{0xab,0x6f,0x7a,0xee,0x6a,0x08,0x37,0xb3,0x34,0xba,0x5e,0xb1,0xb2,0xad,0x7f,0xce,0xcf,0xab,0x7e,0x32,0x3c,0xab,0x18,0x7f,0xe2,0xe0,0xa9,0x5d,0x80,0xef,0xf1,0x32,},{0x5b,0x96,0xdc,0xa4,0x97,0x87,0x5b,0xf9,0x66,0x4c,0x5e,0x75,0xfa,0xcf,0x3f,0x9b,0xc5,0x4b,0xae,0x91,0x3d,0x66,0xca,0x15,0xee,0x85,0xf1,0x49,0x1c,0xa2,0x4d,0x2c,},{0x73,0xbc,0xa6,0x4e,0x9d,0xd0,0xdb,0x88,0x13,0x8e,0xed,0xfa,0xfc,0xea,0x8f,0x54,0x36,0xcf,0xb7,0x4b,0xfb,0x0e,0x77,0x33,0xcf,0x34,0x9b,0xaa,0x0c,0x49,0x77,0x5c,0x56,0xd5,0x93,0x4e,0x1d,0x38,0xe3,0x6f,0x39,0xb7,0xc5,0xbe,0xb0,0xa8,0x36,0x51,0x0c,0x45,0x12,0x6f,0x8e,0xc4,0xb6,0x81,0x05,0x19,0x90,0x5b,0x0c,0xa0,0x7c,0x09,},19,"\x81\x71\x45\x6f\x8b\x90\x71\x89\xb1\xd7\x79\xe2\x6b\xc5\xaf\xbb\x08\xc6\x7a"},
- {{0x8d,0x13,0x5d,0xe7,0xc8,0x41,0x1b,0xbd,0xbd,0x1b,0x31,0xe5,0xdc,0x67,0x8f,0x2a,0xc7,0x10,0x9e,0x79,0x2b,0x60,0xf3,0x8c,0xd2,0x49,0x36,0xe8,0xa8,0x98,0xc3,0x2d,},{0x1c,0xa2,0x81,0x93,0x85,0x29,0x89,0x65,0x35,0xa7,0x71,0x4e,0x35,0x84,0x08,0x5b,0x86,0xef,0x9f,0xec,0x72,0x3f,0x42,0x81,0x9f,0xc8,0xdd,0x5d,0x8c,0x00,0x81,0x7f,},{0xa1,0xad,0xc2,0xbc,0x6a,0x2d,0x98,0x06,0x62,0x67,0x7e,0x7f,0xdf,0xf6,0x42,0x4d,0xe7,0xdb,0xa5,0x0f,0x57,0x95,0xca,0x90,0xfd,0xf3,0xe9,0x6e,0x25,0x6f,0x32,0x85,0xca,0xc7,0x1d,0x33,0x60,0x48,0x2e,0x99,0x3d,0x02,0x94,0xba,0x4e,0xc7,0x44,0x0c,0x61,0xaf,0xfd,0xf3,0x5f,0xe8,0x3e,0x6e,0x04,0x26,0x39,0x37,0xdb,0x93,0xf1,0x05,},20,"\x8b\xa6\xa4\xc9\xa1\x5a\x24\x4a\x9c\x26\xbb\x2a\x59\xb1\x02\x6f\x21\x34\x8b\x49"},
- {{0x0e,0x76,0x5d,0x72,0x0e,0x70,0x5f,0x93,0x66,0xc1,0xab,0x8c,0x3f,0xa8,0x4c,0x9a,0x44,0x37,0x0c,0x06,0x96,0x9f,0x80,0x32,0x96,0x88,0x4b,0x28,0x46,0xa6,0x52,0xa4,},{0x7f,0xae,0x45,0xdd,0x0a,0x05,0x97,0x10,0x26,0xd4,0x10,0xbc,0x49,0x7a,0xf5,0xbe,0x7d,0x08,0x27,0xa8,0x2a,0x14,0x5c,0x20,0x3f,0x62,0x5d,0xfc,0xb8,0xb0,0x3b,0xa8,},{0xbb,0x61,0xcf,0x84,0xde,0x61,0x86,0x22,0x07,0xc6,0xa4,0x55,0x25,0x8b,0xc4,0xdb,0x4e,0x15,0xee,0xa0,0x31,0x7f,0xf8,0x87,0x18,0xb8,0x82,0xa0,0x6b,0x5c,0xf6,0xec,0x6f,0xd2,0x0c,0x5a,0x26,0x9e,0x5d,0x5c,0x80,0x5b,0xaf,0xbc,0xc5,0x79,0xe2,0x59,0x0a,0xf4,0x14,0xc7,0xc2,0x27,0x27,0x3c,0x10,0x2a,0x10,0x07,0x0c,0xdf,0xe8,0x0f,},21,"\x1d\x56\x6a\x62\x32\xbb\xaa\xb3\xe6\xd8\x80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x7e,0xf6,0x6e,0x5e,0x86,0xf2,0x36,0x08,0x48,0xe0,0x01,0x4e,0x94,0x88,0x0a,0xe2,0x92,0x0a,0xd8,0xa3,0x18,0x5a,0x46,0xb3,0x5d,0x1e,0x07,0xde,0xa8,0xfa,0x8a,0xe4,0xf6,0xb8,0x43,0xba,0x17,0x4d,0x99,0xfa,0x79,0x86,0x65,0x4a,0x08,0x91,0xc1,0x2a,0x79,0x44,0x55,0x66,0x93,0x75,0xbf,0x92,0xaf,0x4c,0xc2,0x77,0x0b,0x57,0x9e,0x0c,},23,"\x50\x7c\x94\xc8\x82\x0d\x2a\x57\x93\xcb\xf3\x44\x2b\x3d\x71\x93\x6f\x35\xfe\x3a\xfe\xf3\x16"},
- {{0x4e,0x62,0x62,0x7f,0xc2,0x21,0x14,0x24,0x78,0xae,0xe7,0xf0,0x07,0x81,0xf8,0x17,0xf6,0x62,0xe3,0xb7,0x5d,0xb2,0x9b,0xb1,0x4a,0xb4,0x7c,0xf8,0xe8,0x41,0x04,0xd6,},{0xb1,0xd3,0x98,0x01,0x89,0x20,0x27,0xd5,0x8a,0x8c,0x64,0x33,0x51,0x63,0x19,0x58,0x93,0xbf,0xc1,0xb6,0x1d,0xbe,0xca,0x32,0x60,0x49,0x7e,0x1f,0x30,0x37,0x11,0x07,},{0x83,0x6a,0xfa,0x76,0x4d,0x9c,0x48,0xaa,0x47,0x70,0xa4,0x38,0x8b,0x65,0x4e,0x97,0xb3,0xc1,0x6f,0x08,0x29,0x67,0xfe,0xbc,0xa2,0x7f,0x2f,0xc4,0x7d,0xdf,0xd9,0x24,0x4b,0x03,0xcf,0xc7,0x29,0x69,0x8a,0xcf,0x51,0x09,0x70,0x43,0x46,0xb6,0x0b,0x23,0x0f,0x25,0x54,0x30,0x08,0x9d,0xdc,0x56,0x91,0x23,0x99,0xd1,0x12,0x2d,0xe7,0x0a,},24,"\xd3\xd6\x15\xa8\x47\x2d\x99\x62\xbb\x70\xc5\xb5\x46\x6a\x3d\x98\x3a\x48\x11\x04\x6e\x2a\x0e\xf5"},
- {{0x6b,0x83,0xd7,0xda,0x89,0x08,0xc3,0xe7,0x20,0x5b,0x39,0x86,0x4b,0x56,0xe5,0xf3,0xe1,0x71,0x96,0xa3,0xfc,0x9c,0x2f,0x58,0x05,0xaa,0xd0,0xf5,0x55,0x4c,0x14,0x2d,},{0xd0,0xc8,0x46,0xf9,0x7f,0xe2,0x85,0x85,0xc0,0xee,0x15,0x90,0x15,0xd6,0x4c,0x56,0x31,0x1c,0x88,0x6e,0xdd,0xcc,0x18,0x5d,0x29,0x6d,0xbb,0x16,0x5d,0x26,0x25,0xd6,},{0x16,0xe4,0x62,0xa2,0x9a,0x6d,0xd4,0x98,0x68,0x5a,0x37,0x18,0xb3,0xee,0xd0,0x0c,0xc1,0x59,0x86,0x01,0xee,0x47,0x82,0x04,0x86,0x03,0x2d,0x6b,0x9a,0xcc,0x9b,0xf8,0x9f,0x57,0x68,0x4e,0x08,0xd8,0xc0,0xf0,0x55,0x89,0xcd,0xa2,0x88,0x2a,0x05,0xdc,0x4c,0x63,0xf9,0xd0,0x43,0x1d,0x65,0x52,0x71,0x08,0x12,0x43,0x30,0x03,0xbc,0x08,},25,"\x6a\xda\x80\xb6\xfa\x84\xf7\x03\x49\x20\x78\x9e\x85\x36\xb8\x2d\x5e\x46\x78\x05\x9a\xed\x27\xf7\x1c"},
- {{0x19,0xa9,0x1f,0xe2,0x3a,0x4e,0x9e,0x33,0xec,0xc4,0x74,0x87,0x8f,0x57,0xc6,0x4c,0xf1,0x54,0xb3,0x94,0x20,0x34,0x87,0xa7,0x03,0x5e,0x1a,0xd9,0xcd,0x69,0x7b,0x0d,},{0x2b,0xf3,0x2b,0xa1,0x42,0xba,0x46,0x22,0xd8,0xf3,0xe2,0x9e,0xcd,0x85,0xee,0xa0,0x7b,0x9c,0x47,0xbe,0x9d,0x64,0x41,0x2c,0x9b,0x51,0x0b,0x27,0xdd,0x21,0x8b,0x23,},{0x88,0x1f,0x5b,0x8c,0x5a,0x03,0x0d,0xf0,0xf7,0x5b,0x66,0x34,0xb0,0x70,0xdd,0x27,0xbd,0x1e,0xe3,0xc0,0x87,0x38,0xae,0x34,0x93,0x38,0xb3,0xee,0x64,0x69,0xbb,0xf9,0x76,0x0b,0x13,0x57,0x8a,0x23,0x7d,0x51,0x82,0x53,0x5e,0xde,0x12,0x12,0x83,0x02,0x7a,0x90,0xb5,0xf8,0x65,0xd6,0x3a,0x65,0x37,0xdc,0xa0,0x7b,0x44,0x04,0x9a,0x0f,},26,"\x82\xcb\x53\xc4\xd5\xa0\x13\xba\xe5\x07\x07\x59\xec\x06\xc3\xc6\x95\x5a\xb7\xa4\x05\x09\x58\xec\x32\x8c"},
- {{0x1d,0x5b,0x8c,0xb6,0x21,0x5c,0x18,0x14,0x16,0x66,0xba,0xee,0xfc,0xf5,0xd6,0x9d,0xad,0x5b,0xea,0x9a,0x34,0x93,0xdd,0xda,0xa3,0x57,0xa4,0x39,0x7a,0x13,0xd4,0xde,},{0x94,0xd2,0x3d,0x97,0x7c,0x33,0xe4,0x9e,0x5e,0x49,0x92,0xc6,0x8f,0x25,0xec,0x99,0xa2,0x7c,0x41,0xce,0x6b,0x91,0xf2,0xbf,0xa0,0xcd,0x82,0x92,0xfe,0x96,0x28,0x35,},{0x3a,0xcd,0x39,0xbe,0xc8,0xc3,0xcd,0x2b,0x44,0x29,0x97,0x22,0xb5,0x85,0x0a,0x04,0x00,0xc1,0x44,0x35,0x90,0xfd,0x48,0x61,0xd5,0x9a,0xae,0x74,0x96,0xac,0xb3,0xdf,0x73,0xfc,0x3f,0xdf,0x79,0x69,0xae,0x5f,0x50,0xba,0x47,0xdd,0xdc,0x43,0x52,0x46,0xe5,0xfd,0x37,0x6f,0x6b,0x89,0x1c,0xd4,0xc2,0xca,0xf5,0xd6,0x14,0xb6,0x17,0x0c,},27,"\xa9\xa8\xcb\xb0\xad\x58\x51\x24\xe5\x22\xab\xbf\xb4\x05\x33\xbd\xd6\xf4\x93\x47\xb5\x5b\x18\xe8\x55\x8c\xb0"},
- {{0x6a,0x91,0xb3,0x22,0x7c,0x47,0x22,0x99,0x08,0x9b,0xdc,0xe9,0x35,0x6e,0x72,0x6a,0x40,0xef,0xd8,0x40,0xf1,0x10,0x02,0x70,0x8b,0x7e,0xe5,0x5b,0x64,0x10,0x5a,0xc2,},{0x9d,0x08,0x4a,0xa8,0xb9,0x7a,0x6b,0x9b,0xaf,0xa4,0x96,0xdb,0xc6,0xf7,0x6f,0x33,0x06,0xa1,0x16,0xc9,0xd9,0x17,0xe6,0x81,0x52,0x0a,0x0f,0x91,0x43,0x69,0x42,0x7e,},{0xf5,0x87,0x54,0x23,0x78,0x1b,0x66,0x21,0x6c,0xb5,0xe8,0x99,0x8d,0xe5,0xd9,0xff,0xc2,0x9d,0x1d,0x67,0x10,0x70,0x54,0xac,0xe3,0x37,0x45,0x03,0xa9,0xc3,0xef,0x81,0x15,0x77,0xf2,0x69,0xde,0x81,0x29,0x67,0x44,0xbd,0x70,0x6f,0x1a,0xc4,0x78,0xca,0xf0,0x9b,0x54,0xcd,0xf8,0x71,0xb3,0xf8,0x02,0xbd,0x57,0xf9,0xa6,0xcb,0x91,0x01,},28,"\x5c\xb6\xf9\xaa\x59\xb8\x0e\xca\x14\xf6\xa6\x8f\xb4\x0c\xf0\x7b\x79\x4e\x75\x17\x1f\xba\x96\x26\x2c\x1c\x6a\xdc"},
- {{0x93,0xea,0xa8,0x54,0xd7,0x91,0xf0,0x53,0x72,0xce,0x72,0xb9,0x4f,0xc6,0x50,0x3b,0x2f,0xf8,0xae,0x68,0x19,0xe6,0xa2,0x1a,0xfe,0x82,0x5e,0x27,0xad,0xa9,0xe4,0xfb,},{0x16,0xce,0xe8,0xa3,0xf2,0x63,0x18,0x34,0xc8,0x8b,0x67,0x08,0x97,0xff,0x0b,0x08,0xce,0x90,0xcc,0x14,0x7b,0x45,0x93,0xb3,0xf1,0xf4,0x03,0x72,0x7f,0x7e,0x7a,0xd5,},{0xd8,0x34,0x19,0x7c,0x1a,0x30,0x80,0x61,0x4e,0x0a,0x5f,0xa0,0xaa,0xaa,0x80,0x88,0x24,0xf2,0x1c,0x38,0xd6,0x92,0xe6,0xff,0xbd,0x20,0x0f,0x7d,0xfb,0x3c,0x8f,0x44,0x40,0x2a,0x73,0x82,0x18,0x0b,0x98,0xad,0x0a,0xfc,0x8e,0xec,0x1a,0x02,0xac,0xec,0xf3,0xcb,0x7f,0xde,0x62,0x7b,0x9f,0x18,0x11,0x1f,0x26,0x0a,0xb1,0xdb,0x9a,0x07,},29,"\x32\xfe\x27\x99\x41\x24\x20\x21\x53\xb5\xc7\x0d\x38\x13\xfd\xee\x9c\x2a\xa6\xe7\xdc\x74\x3d\x4d\x53\x5f\x18\x40\xa5"},
- {{0x94,0x1c,0xac,0x69,0xfb,0x7b,0x18,0x15,0xc5,0x7b,0xb9,0x87,0xc4,0xd6,0xc2,0xad,0x2c,0x35,0xd5,0xf9,0xa3,0x18,0x2a,0x79,0xd4,0xba,0x13,0xea,0xb2,0x53,0xa8,0xad,},{0x23,0xbe,0x32,0x3c,0x56,0x2d,0xfd,0x71,0xce,0x65,0xf5,0xbb,0xa5,0x6a,0x74,0xa3,0xa6,0xdf,0xc3,0x6b,0x57,0x3d,0x2f,0x94,0xf6,0x35,0xc7,0xf9,0xb4,0xfd,0x5a,0x5b,},{0x0f,0x8f,0xad,0x1e,0x6b,0xde,0x77,0x1b,0x4f,0x54,0x20,0xea,0xc7,0x5c,0x37,0x8b,0xae,0x6d,0xb5,0xac,0x66,0x50,0xcd,0x2b,0xc2,0x10,0xc1,0x82,0x3b,0x43,0x2b,0x48,0xe0,0x16,0xb1,0x05,0x95,0x45,0x8f,0xfa,0xb9,0x2f,0x7a,0x89,0x89,0xb2,0x93,0xce,0xb8,0xdf,0xed,0x6c,0x24,0x3a,0x20,0x38,0xfc,0x06,0x65,0x2a,0xaa,0xf1,0x6f,0x02,},30,"\xbb\x31\x72\x79\x57\x10\xfe\x00\x05\x4d\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01,0xfb,0xa0,0x43,0x06,0xc2,0xa7,0x46,0x5f,0x46,0xc3,0x75,0x93,0x16,0xd9,},{0x04,0x26,0x6c,0x03,0x3b,0x91,0xc1,0x32,0x2c,0xeb,0x34,0x46,0xc9,0x01,0xff,0xcf,0x3c,0xc4,0x0c,0x40,0x34,0xe8,0x87,0xc9,0x59,0x7c,0xa1,0x89,0x3b,0xa7,0x33,0x0b,0xec,0xbb,0xd8,0xb4,0x81,0x42,0xef,0x35,0xc0,0x12,0xc6,0xba,0x51,0xa6,0x6d,0xf9,0x30,0x8c,0xb6,0x26,0x8a,0xd6,0xb1,0xe4,0xb0,0x3e,0x70,0x10,0x24,0x95,0x79,0x0b,},32,"\xa7\x50\xc2\x32\x93\x3d\xc1\x4b\x11\x84\xd8\x6d\x8b\x4c\xe7\x2e\x16\xd6\x97\x44\xba\x69\x81\x8b\x6a\xc3\x3b\x1d\x82\x3b\xb2\xc3"},
- {{0xf2,0xab,0x39,0x6f,0xe8,0x90,0x6e,0x3e,0x56,0x33,0xe9,0x9c,0xab,0xcd,0x5b,0x09,0xdf,0x08,0x59,0xb5,0x16,0x23,0x0b,0x1e,0x04,0x50,0xb5,0x80,0xb6,0x5f,0x61,0x6c,},{0x8e,0xa0,0x74,0x24,0x51,0x59,0xa1,0x16,0xaa,0x71,0x22,0xa2,0x5e,0xc1,0x6b,0x89,0x1d,0x62,0x5a,0x68,0xf3,0x36,0x60,0x42,0x39,0x08,0xf6,0xbd,0xc4,0x4f,0x8c,0x1b,},{0xa0,0x6a,0x23,0xd9,0x82,0xd8,0x1a,0xb8,0x83,0xaa,0xe2,0x30,0xad,0xbc,0x36,0x8a,0x6a,0x99,0x77,0xf0,0x03,0xce,0xbb,0x00,0xd4,0xc2,0xe4,0x01,0x84,0x90,0x19,0x1a,0x84,0xd3,0xa2,0x82,0xfd,0xbf,0xb2,0xfc,0x88,0x04,0x6e,0x62,0xde,0x43,0xe1,0x5f,0xb5,0x75,0x33,0x6b,0x3c,0x8b,0x77,0xd1,0x9c,0xe6,0xa0,0x09,0xce,0x51,0xf5,0x0c,},33,"\x5a\x44\xe3\x4b\x74\x6c\x5f\xd1\x89\x8d\x55\x2a\xb3\x54\xd2\x8f\xb4\x71\x38\x56\xd7\x69\x7d\xd6\x3e\xb9\xbd\x6b\x99\xc2\x80\xe1\x87"},
- {{0x55,0x0a,0x41,0xc0,0x13,0xf7,0x9b,0xab,0x8f,0x06,0xe4,0x3a,0xd1,0x83,0x6d,0x51,0x31,0x27,0x36,0xa9,0x71,0x38,0x06,0xfa,0xfe,0x66,0x45,0x21,0x9e,0xaa,0x1f,0x9d,},{0xaf,0x6b,0x71,0x45,0x47,0x4d,0xc9,0x95,0x4b,0x9a,0xf9,0x3a,0x9c,0xdb,0x34,0x44,0x9d,0x5b,0x7c,0x65,0x1c,0x82,0x4d,0x24,0xe2,0x30,0xb9,0x00,0x33,0xce,0x59,0xc0,},{0x16,0xdc,0x1e,0x2b,0x9f,0xa9,0x09,0xee,0xfd,0xc2,0x77,0xba,0x16,0xeb,0xe2,0x07,0xb8,0xda,0x5e,0x91,0x14,0x3c,0xde,0x78,0xc5,0x04,0x7a,0x89,0xf6,0x81,0xc3,0x3c,0x4e,0x4e,0x34,0x28,0xd5,0xc9,0x28,0x09,0x59,0x03,0xa8,0x11,0xec,0x00,0x2d,0x52,0xa3,0x9e,0xd7,0xf8,0xb3,0xfe,0x19,0x27,0x20,0x0c,0x6d,0xd0,0xb9,0xab,0x3e,0x04,},34,"\x8b\xc4\x18\x5e\x50\xe5\x7d\x5f\x87\xf4\x75\x15\xfe\x2b\x18\x37\xd5\x85\xf0\xaa\xe9\xe1\xca\x38\x3b\x3e\xc9\x08\x88\x4b\xb9\x00\xff\x27"},
- {{0x19,0xac,0x3e,0x27,0x24,0x38,0xc7,0x2d,0xdf,0x7b,0x88,0x19,0x64,0x86,0x7c,0xb3,0xb3,0x1f,0xf4,0xc7,0x93,0xbb,0x7e,0xa1,0x54,0x61,0x3c,0x1d,0xb0,0x68,0xcb,0x7e,},{0xf8,0x5b,0x80,0xe0,0x50,0xa1,0xb9,0x62,0x0d,0xb1,0x38,0xbf,0xc9,0xe1,0x00,0x32,0x7e,0x25,0xc2,0x57,0xc5,0x92,0x17,0xb6,0x01,0xf1,0xf6,0xac,0x9a,0x41,0x3d,0x3f,},{0xea,0x85,0x5d,0x78,0x1c,0xbe,0xa4,0x68,0x2e,0x35,0x01,0x73,0xcb,0x89,0xe8,0x61,0x9c,0xcf,0xdd,0xb9,0x7c,0xdc,0xe1,0x6f,0x9a,0x2f,0x6f,0x68,0x92,0xf4,0x6d,0xbe,0x68,0xe0,0x4b,0x12,0xb8,0xd8,0x86,0x89,0xa7,0xa3,0x16,0x70,0xcd,0xff,0x40,0x9a,0xf9,0x8a,0x93,0xb4,0x9a,0x34,0x53,0x7b,0x6a,0xa0,0x09,0xd2,0xeb,0x8b,0x47,0x01,},35,"\x95\x87\x2d\x5f\x78\x9f\x95\x48\x4e\x30\xcb\xb0\xe1\x14\x02\x89\x53\xb1\x6f\x5c\x6a\x8d\x9f\x65\xc0\x03\xa8\x35\x43\xbe\xaa\x46\xb3\x86\x45"},
- {{0xca,0x26,0x7d,0xe9,0x6c,0x93,0xc2,0x38,0xfa,0xfb,0x12,0x79,0x81,0x20,0x59,0xab,0x93,0xac,0x03,0x05,0x96,0x57,0xfd,0x99,0x4f,0x8f,0xa5,0xa0,0x92,0x39,0xc8,0x21,},{0x01,0x73,0x70,0xc8,0x79,0x09,0x0a,0x81,0xc7,0xf2,0x72,0xc2,0xfc,0x80,0xe3,0xaa,0xc2,0xbc,0x60,0x3f,0xcb,0x37,0x9a,0xfc,0x98,0x69,0x11,0x60,0xab,0x74,0x5b,0x26,},{0xac,0x95,0x7f,0x82,0x33,0x5a,0xa7,0x14,0x1e,0x96,0xb5,0x9d,0x63,0xe3,0xcc,0xee,0x95,0xc3,0xa2,0xc4,0x7d,0x02,0x65,0x40,0xc2,0xaf,0x42,0xdc,0x95,0x33,0xd5,0xfd,0x81,0x82,0x7d,0x16,0x79,0xad,0x18,0x7a,0xea,0xf3,0x78,0x34,0x91,0x5e,0x75,0xb1,0x47,0xa9,0x28,0x68,0x06,0xc8,0x01,0x75,0x16,0xba,0x43,0xdd,0x05,0x1a,0x5e,0x0c,},36,"\xe0\x5f\x71\xe4\xe4\x9a\x72\xec\x55\x0c\x44\xa3\xb8\x5a\xca\x8f\x20\xff\x26\xc3\xee\x94\xa8\x0f\x1b\x43\x1c\x7d\x15\x4e\xc9\x60\x3e\xe0\x25\x31"},
- {{0x3d,0xff,0x5e,0x89,0x94,0x75,0xe7,0xe9,0x1d,0xd2,0x61,0x32,0x2f,0xab,0x09,0x98,0x0c,0x52,0x97,0x0d,0xe1,0xda,0x6e,0x2e,0x20,0x16,0x60,0xcc,0x4f,0xce,0x70,0x32,},{0xf3,0x01,0x62,0xba,0xc9,0x84,0x47,0xc4,0x04,0x2f,0xac,0x05,0xda,0x44,0x80,0x34,0x62,0x9b,0xe2,0xc6,0xa5,0x8d,0x30,0xdf,0xd5,0x78,0xba,0x9f,0xb5,0xe3,0x93,0x0b,},{0x5e,0xfe,0x7a,0x92,0xff,0x96,0x23,0x08,0x9b,0x3e,0x3b,0x78,0xf3,0x52,0x11,0x53,0x66,0xe2,0x6b,0xa3,0xfb,0x1a,0x41,0x62,0x09,0xbc,0x02,0x9e,0x9c,0xad,0xcc,0xd9,0xf4,0xaf,0xfa,0x33,0x35,0x55,0xa8,0xf3,0xa3,0x5a,0x9d,0x0f,0x7c,0x34,0xb2,0x92,0xca,0xe7,0x7e,0xc9,0x6f,0xa3,0xad,0xfc,0xaa,0xde,0xe2,0xd9,0xce,0xd8,0xf8,0x05,},37,"\x93\x8f\x0e\x77\x62\x1b\xf3\xea\x52\xc7\xc4\x91\x1c\x51\x57\xc2\xd8\xa2\xa8\x58\x09\x3e\xf1\x6a\xa9\xb1\x07\xe6\x9d\x98\x03\x7b\xa1\x39\xa3\xc3\x82"},
- {{0x9a,0x6b,0x84,0x78,0x64,0xe7,0x0c,0xfe,0x8b,0xa6,0xab,0x22,0xfa,0x0c,0xa3,0x08,0xc0,0xcc,0x8b,0xec,0x71,0x41,0xfb,0xca,0xa3,0xb8,0x1f,0x5d,0x1e,0x1c,0xfc,0xfc,},{0x34,0xad,0x0f,0xbd,0xb2,0x56,0x65,0x07,0xa8,0x1c,0x2b,0x1f,0x8a,0xa8,0xf5,0x3d,0xcc,0xaa,0x64,0xcc,0x87,0xad,0xa9,0x1b,0x90,0x3e,0x90,0x0d,0x07,0xee,0xe9,0x30,},{0x2a,0xb2,0x55,0x16,0x9c,0x48,0x9c,0x54,0xc7,0x32,0x23,0x2e,0x37,0xc8,0x73,0x49,0xd4,0x86,0xb1,0xeb,0xa2,0x05,0x09,0xdb,0xab,0xe7,0xfe,0xd3,0x29,0xef,0x08,0xfd,0x75,0xba,0x1c,0xd1,0x45,0xe6,0x7b,0x2e,0xa2,0x6c,0xb5,0xcc,0x51,0xca,0xb3,0x43,0xee,0xb0,0x85,0xfe,0x1f,0xd7,0xb0,0xec,0x4c,0x6a,0xfc,0xd9,0xb9,0x79,0xf9,0x05,},38,"\x83\x83\x67\x47\x11\x83\xc7\x1f\x7e\x71\x77\x24\xf8\x9d\x40\x1c\x3a\xd9\x86\x3f\xd9\xcc\x7a\xa3\xcf\x33\xd3\xc5\x29\x86\x0c\xb5\x81\xf3\x09\x3d\x87\xda"},
- {{0x57,0x5b,0xe0,0x7a,0xfc,0xa5,0xd0,0x63,0xc2,0x38,0xcd,0x9b,0x80,0x28,0x77,0x2c,0xc4,0x9c,0xda,0x34,0x47,0x14,0x32,0xa2,0xe1,0x66,0xe0,0x96,0xe2,0x21,0x9e,0xfc,},{0x94,0xe5,0xeb,0x4d,0x50,0x24,0xf4,0x9d,0x7e,0xbf,0x79,0x81,0x7c,0x8d,0xe1,0x14,0x97,0xdc,0x2b,0x55,0x62,0x2a,0x51,0xae,0x12,0x3f,0xfc,0x74,0x9d,0xbb,0x16,0xe0,},{0x58,0x27,0x1d,0x44,0x23,0x6f,0x3b,0x98,0xc5,0x8f,0xd7,0xae,0x0d,0x2f,0x49,0xef,0x2b,0x6e,0x3a,0xff,0xdb,0x22,0x5a,0xa3,0xba,0x55,0x5f,0x0e,0x11,0xcc,0x53,0xc2,0x3a,0xd1,0x9b,0xaf,0x24,0x34,0x65,0x90,0xd0,0x5d,0x7d,0x53,0x90,0x58,0x20,0x82,0xcf,0x94,0xd3,0x9c,0xad,0x65,0x30,0xab,0x93,0xd1,0x3e,0xfb,0x39,0x27,0x95,0x06,},39,"\x33\xe5\x91\x8b\x66\xd3\x3d\x55\xfe\x71\x7c\xa3\x43\x83\xea\xe7\x8f\x0a\xf8\x28\x89\xca\xf6\x69\x6e\x1a\xc9\xd9\x5d\x1f\xfb\x32\xcb\xa7\x55\xf9\xe3\x50\x3e"},
- {{0x15,0xff,0xb4,0x55,0x14,0xd4,0x34,0x44,0xd6,0x1f,0xcb,0x10,0x5e,0x30,0xe1,0x35,0xfd,0x26,0x85,0x23,0xdd,0xa2,0x0b,0x82,0x75,0x8b,0x17,0x94,0x23,0x11,0x04,0x41,},{0x17,0x72,0xc5,0xab,0xc2,0xd2,0x3f,0xd2,0xf9,0xd1,0xc3,0x25,0x7b,0xe7,0xbc,0x3c,0x1c,0xd7,0x9c,0xee,0x40,0x84,0x4b,0x74,0x9b,0x3a,0x77,0x43,0xd2,0xf9,0x64,0xb8,},{0x68,0x28,0xcd,0x76,0x24,0xe7,0x93,0xb8,0xa4,0xce,0xb9,0x6d,0x3c,0x2a,0x97,0x5b,0xf7,0x73,0xe5,0xff,0x66,0x45,0xf3,0x53,0x61,0x40,0x58,0x62,0x1e,0x58,0x83,0x52,0x89,0xe7,0xf3,0x1f,0x42,0xdf,0xe6,0xaf,0x6d,0x73,0x6f,0x26,0x44,0x51,0x1e,0x32,0x0c,0x0f,0xa6,0x98,0x58,0x2a,0x79,0x77,0x8d,0x18,0x73,0x0e,0xd3,0xe8,0xcb,0x08,},40,"\xda\x9c\x55\x59\xd0\xea\x51\xd2\x55\xb6\xbd\x9d\x76\x38\xb8\x76\x47\x2f\x94\x2b\x33\x0f\xc0\xe2\xb3\x0a\xea\x68\xd7\x73\x68\xfc\xe4\x94\x82\x72\x99\x1d\x25\x7e"},
- {{0xfe,0x05,0x68,0x64,0x29,0x43,0xb2,0xe1,0xaf,0xbf,0xd1,0xf1,0x0f,0xe8,0xdf,0x87,0xa4,0x23,0x6b,0xea,0x40,0xdc,0xe7,0x42,0x07,0x2c,0xb2,0x18,0x86,0xee,0xc1,0xfa,},{0x29,0x9e,0xbd,0x1f,0x13,0x17,0x7d,0xbd,0xb6,0x6a,0x91,0x2b,0xbf,0x71,0x20,0x38,0xfd,0xf7,0x3b,0x06,0xc3,0xac,0x02,0x0c,0x7b,0x19,0x12,0x67,0x55,0xd4,0x7f,0x61,},{0xd5,0x9e,0x6d,0xfc,0xc6,0xd7,0xe3,0xe2,0xc5,0x8d,0xec,0x81,0xe9,0x85,0xd2,0x45,0xe6,0x81,0xac,0xf6,0x59,0x4a,0x23,0xc5,0x92,0x14,0xf7,0xbe,0xd8,0x01,0x5d,0x81,0x3c,0x76,0x82,0xb6,0x0b,0x35,0x83,0x44,0x03,0x11,0xe7,0x2a,0x86,0x65,0xba,0x2c,0x96,0xde,0xc2,0x3c,0xe8,0x26,0xe1,0x60,0x12,0x7e,0x18,0x13,0x2b,0x03,0x04,0x04,},41,"\xc5\x9d\x08\x62\xec\x1c\x97\x46\xab\xcc\x3c\xf8\x3c\x9e\xeb\xa2\xc7\x08\x2a\x03\x6a\x8c\xb5\x7c\xe4\x87\xe7\x63\x49\x27\x96\xd4\x7e\x6e\x06\x3a\x0c\x1f\xec\xcc\x2d"},
- {{0x5e,0xcb,0x16,0xc2,0xdf,0x27,0xc8,0xcf,0x58,0xe4,0x36,0xa9,0xd3,0xaf,0xfb,0xd5,0x8e,0x95,0x38,0xa9,0x26,0x59,0xa0,0xf9,0x7c,0x4c,0x4f,0x99,0x46,0x35,0xa8,0xca,},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\xc0\x21\x72\x40\xc1\xa3\x30\x95\xd7\x07\x95\x3e\xd7\x7b\x15\xd2\x11\xad\xaf\x9b\x97\xdc"},
- {{0x0d,0xdc,0xdc,0x87,0x2c,0x7b,0x74,0x8d,0x40,0xef,0xe9,0x6c,0x28,0x81,0xae,0x18,0x9d,0x87,0xf5,0x61,0x48,0xed,0x8a,0xf3,0xeb,0xbb,0xc8,0x03,0x24,0xe3,0x8b,0xdd,},{0x58,0x8d,0xda,0xdc,0xbc,0xed,0xf4,0x0d,0xf0,0xe9,0x69,0x7d,0x8b,0xb2,0x77,0xc7,0xbb,0x14,0x98,0xfa,0x1d,0x26,0xce,0x0a,0x83,0x5a,0x76,0x0b,0x92,0xca,0x7c,0x85,},{0xc1,0x79,0xc0,0x94,0x56,0xe2,0x35,0xfe,0x24,0x10,0x5a,0xfa,0x6e,0x8e,0xc0,0x46,0x37,0xf8,0xf9,0x43,0x81,0x7c,0xd0,0x98,0xba,0x95,0x38,0x7f,0x96,0x53,0xb2,0xad,0xd1,0x81,0xa3,0x14,0x47,0xd9,0x2d,0x1a,0x1d,0xdf,0x1c,0xeb,0x0d,0xb6,0x21,0x18,0xde,0x9d,0xff,0xb7,0xdc,0xd2,0x42,0x40,0x57,0xcb,0xdf,0xf5,0xd4,0x1d,0x04,0x03,},45,"\x65\x64\x1c\xd4\x02\xad\xd8\xbf\x3d\x1d\x67\xdb\xeb\x6d\x41\xde\xbf\xbe\xf6\x7e\x43\x17\xc3\x5b\x0a\x6d\x5b\xbb\xae\x0e\x03\x4d\xe7\xd6\x70\xba\x14\x13\xd0\x56\xf2\xd6\xf1\xde\x12"},
- {{0x89,0xf0,0xd6,0x82,0x99,0xba,0x0a,0x5a,0x83,0xf2,0x48,0xae,0x0c,0x16,0x9f,0x8e,0x38,0x49,0xa9,0xb4,0x7b,0xd4,0x54,0x98,0x84,0x30,0x5c,0x99,0x12,0xb4,0x66,0x03,},{0xab,0xa3,0xe7,0x95,0xaa,0xb2,0x01,0x2a,0xcc,0xea,0xdd,0x7b,0x3b,0xd9,0xda,0xee,0xed,0x6f,0xf5,0x25,0x8b,0xdc,0xd7,0xc9,0x36,0x99,0xc2,0xa3,0x83,0x6e,0x38,0x32,},{0x2c,0x69,0x1f,0xa8,0xd4,0x87,0xce,0x20,0xd5,0xd2,0xfa,0x41,0x55,0x91,0x16,0xe0,0xbb,0xf4,0x39,0x7c,0xf5,0x24,0x0e,0x15,0x25,0x56,0x18,0x35,0x41,0xd6,0x6c,0xf7,0x53,0x58,0x24,0x01,0xa4,0x38,0x8d,0x39,0x03,0x39,0xdb,0xef,0x4d,0x38,0x47,0x43,0xca,0xa3,0x46,0xf5,0x5f,0x8d,0xab,0xa6,0x8b,0xa7,0xb9,0x13,0x1a,0x8a,0x6e,0x0b,},46,"\x4f\x18\x46\xdd\x7a\xd5\x0e\x54\x5d\x4c\xfb\xff\xbb\x1d\xc2\xff\x14\x5d\xc1\x23\x75\x4d\x08\xaf\x4e\x44\xec\xc0\xbc\x8c\x91\x41\x13\x88\xbc\x76\x53\xe2\xd8\x93\xd1\xea\xc2\x10\x7d\x05"},
- {{0x0a,0x3c,0x18,0x44,0xe2,0xdb,0x07,0x0f,0xb2,0x4e,0x3c,0x95,0xcb,0x1c,0xc6,0x71,0x4e,0xf8,0x4e,0x2c,0xcd,0x2b,0x9d,0xd2,0xf1,0x46,0x0e,0xbf,0x7e,0xcf,0x13,0xb1,},{0x72,0xe4,0x09,0x93,0x7e,0x06,0x10,0xeb,0x5c,0x20,0xb3,0x26,0xdc,0x6e,0xa1,0xbb,0xbc,0x04,0x06,0x70,0x1c,0x5c,0xd6,0x7d,0x1f,0xbd,0xe0,0x91,0x92,0xb0,0x7c,0x01,},{0x87,0xf7,0xfd,0xf4,0x60,0x95,0x20,0x1e,0x87,0x7a,0x58,0x8f,0xe3,0xe5,0xaa,0xf4,0x76,0xbd,0x63,0x13,0x8d,0x8a,0x87,0x8b,0x89,0xd6,0xac,0x60,0x63,0x1b,0x34,0x58,0xb9,0xd4,0x1a,0x3c,0x61,0xa5,0x88,0xe1,0xdb,0x8d,0x29,0xa5,0x96,0x89,0x81,0xb0,0x18,0x77,0x6c,0x58,0x87,0x80,0x92,0x2f,0x5a,0xa7,0x32,0xba,0x63,0x79,0xdd,0x05,},47,"\x4c\x82\x74\xd0\xed\x1f\x74\xe2\xc8\x6c\x08\xd9\x55\xbd\xe5\x5b\x2d\x54\x32\x7e\x82\x06\x2a\x1f\x71\xf7\x0d\x53\x6f\xdc\x87\x22\xcd\xea\xd7\xd2\x2a\xae\xad\x2b\xfa\xa1\xad\x00\xb8\x29\x57"},
- {{0xc8,0xd7,0xa8,0x81,0x8b,0x98,0xdf,0xdb,0x20,0x83,0x9c,0x87,0x1c,0xb5,0xc4,0x8e,0x9e,0x94,0x70,0xca,0x3a,0xd3,0x5b,0xa2,0x61,0x3a,0x5d,0x31,0x99,0xc8,0xab,0x23,},{0x90,0xd2,0xef,0xbb,0xa4,0xd4,0x3e,0x6b,0x2b,0x99,0x2c,0xa1,0x60,0x83,0xdb,0xcf,0xa2,0xb3,0x22,0x38,0x39,0x07,0xb0,0xee,0x75,0xf3,0xe9,0x58,0x45,0xd3,0xc4,0x7f,},{0xfa,0x2e,0x99,0x44,0x21,0xae,0xf1,0xd5,0x85,0x66,0x74,0x81,0x3d,0x05,0xcb,0xd2,0xcf,0x84,0xef,0x5e,0xb4,0x24,0xaf,0x6e,0xcd,0x0d,0xc6,0xfd,0xbd,0xc2,0xfe,0x60,0x5f,0xe9,0x85,0x88,0x33,0x12,0xec,0xf3,0x4f,0x59,0xbf,0xb2,0xf1,0xc9,0x14,0x9e,0x5b,0x9c,0xc9,0xec,0xda,0x05,0xb2,0x73,0x11,0x30,0xf3,0xed,0x28,0xdd,0xae,0x0b,},48,"\x78\x3e\x33\xc3\xac\xbd\xbb\x36\xe8\x19\xf5\x44\xa7\x78\x1d\x83\xfc\x28\x3d\x33\x09\xf5\xd3\xd1\x2c\x8d\xcd\x6b\x0b\x3d\x0e\x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,0xb3,0x6b,0x0a,0xc2,0xf8,0xa5,0xf3,0x36,0xfb,0x09,0x0b,0x11,0x30,0x50,0xdb,0xcc,0x25,0xe0,0x78,0x20,0x0a,0x6e,0x16,0x15,0x3e,0xea,},{0x69,0xe6,0xa4,0x49,0x1a,0x63,0x83,0x73,0x16,0xe8,0x6a,0x5f,0x4b,0xa7,0xcd,0x0d,0x73,0x1e,0xcc,0x58,0xf1,0xd0,0xa2,0x64,0xc6,0x7c,0x89,0xbe,0xfd,0xd8,0xd3,0x82,0x9d,0x8d,0xe1,0x3b,0x33,0xcc,0x0b,0xf5,0x13,0x93,0x17,0x15,0xc7,0x80,0x96,0x57,0xe2,0xbf,0xb9,0x60,0xe5,0xc7,0x64,0xc9,0x71,0xd7,0x33,0x74,0x60,0x93,0xe5,0x00,},50,"\xf3\x99\x2c\xde\x64\x93\xe6\x71\xf1\xe1\x29\xdd\xca\x80\x38\xb0\xab\xdb\x77\xbb\x90\x35\xf9\xf8\xbe\x54\xbd\x5d\x68\xc1\xae\xff\x72\x4f\xf4\x7d\x29\x34\x43\x91\xdc\x53\x61\x66\xb8\x67\x1c\xbb\xf1\x23"},
- {{0xb3,0x22,0xd4,0x65,0x77,0xa2,0xa9,0x91,0xa4,0xd1,0x69,0x82,0x87,0x83,0x2a,0x39,0xc4,0x87,0xef,0x77,0x6b,0x4b,0xff,0x03,0x7a,0x05,0xc7,0xf1,0x81,0x2b,0xde,0xec,},{0xeb,0x2b,0xca,0xdf,0xd3,0xee,0xc2,0x98,0x6b,0xaf,0xf3,0x2b,0x98,0xe7,0xc4,0xdb,0xf0,0x3f,0xf9,0x5d,0x8a,0xd5,0xff,0x9a,0xa9,0x50,0x6e,0x54,0x72,0xff,0x84,0x5f,},{0xc7,0xb5,0x51,0x37,0x31,0x7c,0xa2,0x1e,0x33,0x48,0x9f,0xf6,0xa9,0xbf,0xab,0x97,0xc8,0x55,0xdc,0x6f,0x85,0x68,0x4a,0x70,0xa9,0x12,0x5a,0x26,0x1b,0x56,0xd5,0xe6,0xf1,0x49,0xc5,0x77,0x4d,0x73,0x4f,0x2d,0x8d,0xeb,0xfc,0x77,0xb7,0x21,0x89,0x6a,0x82,0x67,0xc2,0x37,0x68,0xe9,0xba,0xdb,0x91,0x0e,0xef,0x83,0xec,0x25,0x88,0x02,},51,"\x19\xf1\xbf\x5d\xcf\x17\x50\xc6\x11\xf1\xc4\xa2\x86\x52\x00\x50\x4d\x82\x29\x8e\xdd\x72\x67\x1f\x62\xa7\xb1\x47\x1a\xc3\xd4\xa3\x0f\x7d\xe9\xe5\xda\x41\x08\xc5\x2a\x4c\xe7\x0a\x3e\x11\x4a\x52\xa3\xb3\xc5"},
- {{0x96,0x0c,0xab,0x50,0x34,0xb9,0x83,0x8d,0x09,0x8d,0x2d,0xcb,0xf4,0x36,0x4b,0xec,0x16,0xd3,0x88,0xf6,0x37,0x6d,0x73,0xa6,0x27,0x3b,0x70,0xf8,0x2b,0xbc,0x98,0xc0,},{0x5e,0x3c,0x19,0xf2,0x41,0x5a,0xcf,0x72,0x9f,0x82,0x9a,0x4e,0xbd,0x5c,0x40,0xe1,0xa6,0xbc,0x9f,0xbc,0xa9,0x57,0x03,0xa9,0x37,0x60,0x87,0xed,0x09,0x37,0xe5,0x1a,},{0x27,0xd4,0xc3,0xa1,0x81,0x1e,0xf9,0xd4,0x36,0x0b,0x3b,0xdd,0x13,0x3c,0x2c,0xcc,0x30,0xd0,0x2c,0x2f,0x24,0x82,0x15,0x77,0x6c,0xb0,0x7e,0xe4,0x17,0x7f,0x9b,0x13,0xfc,0x42,0xdd,0x70,0xa6,0xc2,0xfe,0xd8,0xf2,0x25,0xc7,0x66,0x3c,0x7f,0x18,0x2e,0x7e,0xe8,0xec,0xcf,0xf2,0x0d,0xc7,0xb0,0xe1,0xd5,0x83,0x4e,0xc5,0xb1,0xea,0x01,},52,"\xf8\xb2\x19\x62\x44\x7b\x0a\x8f\x2e\x42\x79\xde\x41\x1b\xea\x12\x8e\x0b\xe4\x4b\x69\x15\xe6\xcd\xa8\x83\x41\xa6\x8a\x0d\x81\x83\x57\xdb\x93\x8e\xac\x73\xe0\xaf\x6d\x31\x20\x6b\x39\x48\xf8\xc4\x8a\x44\x73\x08"},
- {{0xeb,0x77,0xb2,0x63,0x8f,0x23,0xee,0xbc,0x82,0xef,0xe4,0x5e,0xe9,0xe5,0xa0,0x32,0x66,0x37,0x40,0x1e,0x66,0x3e,0xd0,0x29,0x69,0x9b,0x21,0xe6,0x44,0x3f,0xb4,0x8e,},{0x9e,0xf2,0x76,0x08,0x96,0x1a,0xc7,0x11,0xde,0x71,0xa6,0xe2,0xd4,0xd4,0x66,0x3e,0xa3,0xec,0xd4,0x2f,0xb7,0xe4,0xe8,0x62,0x7c,0x39,0x62,0x2d,0xf4,0xaf,0x0b,0xbc,},{0x18,0xdc,0x56,0xd7,0xbd,0x9a,0xcd,0x4f,0x4d,0xaa,0x78,0x54,0x0b,0x4a,0xc8,0xff,0x7a,0xa9,0x81,0x5f,0x45,0xa0,0xbb,0xa3,0x70,0x73,0x1a,0x14,0xea,0xab,0xe9,0x6d,0xf8,0xb5,0xf3,0x7d,0xbf,0x8e,0xae,0x4c,0xb1,0x5a,0x64,0xb2,0x44,0x65,0x1e,0x59,0xd6,0xa3,0xd6,0x76,0x1d,0x9e,0x3c,0x50,0xf2,0xd0,0xcb,0xb0,0x9c,0x05,0xec,0x06,},53,"\x99\xe3\xd0\x09\x34\x00\x3e\xba\xfc\x3e\x9f\xdb\x68\x7b\x0f\x5f\xf9\xd5\x78\x2a\x4b\x1f\x56\xb9\x70\x00\x46\xc0\x77\x91\x56\x02\xc3\x13\x4e\x22\xfc\x90\xed\x7e\x69\x0f\xdd\xd4\x43\x3e\x20\x34\xdc\xb2\xdc\x99\xab"},
- {{0xb6,0x25,0xaa,0x89,0xd3,0xf7,0x30,0x87,0x15,0x42,0x7b,0x6c,0x39,0xbb,0xac,0x58,0xef,0xfd,0x3a,0x0f,0xb7,0x31,0x6f,0x7a,0x22,0xb9,0x9e,0xe5,0x92,0x2f,0x2d,0xc9,},{0x65,0xa9,0x9c,0x3e,0x16,0xfe,0xa8,0x94,0xec,0x33,0xc6,0xb2,0x0d,0x91,0x05,0xe2,0xa0,0x4e,0x27,0x64,0xa4,0x76,0x9d,0x9b,0xbd,0x4d,0x8b,0xac,0xfe,0xab,0x4a,0x2e,},{0x01,0xbb,0x90,0x1d,0x83,0xb8,0xb6,0x82,0xd3,0x61,0x4a,0xf4,0x6a,0x80,0x7b,0xa2,0x69,0x13,0x58,0xfe,0xb7,0x75,0x32,0x5d,0x34,0x23,0xf5,0x49,0xff,0x0a,0xa5,0x75,0x7e,0x4e,0x1a,0x74,0xe9,0xc7,0x0f,0x97,0x21,0xd8,0xf3,0x54,0xb3,0x19,0xd4,0xf4,0xa1,0xd9,0x14,0x45,0xc8,0x70,0xfd,0x0f,0xfb,0x94,0xfe,0xd6,0x46,0x64,0x73,0x0d,},54,"\xe0\x72\x41\xdb\xd3\xad\xbe\x61\x0b\xbe\x4d\x00\x5d\xd4\x67\x32\xa4\xc2\x50\x86\xec\xb8\xec\x29\xcd\x7b\xca\x11\x6e\x1b\xf9\xf5\x3b\xfb\xf3\xe1\x1f\xa4\x90\x18\xd3\x9f\xf1\x15\x4a\x06\x66\x8e\xf7\xdf\x5c\x67\x8e\x6a"},
- {{0xb1,0xc9,0xf8,0xbd,0x03,0xfe,0x82,0xe7,0x8f,0x5c,0x0f,0xb0,0x64,0x50,0xf2,0x7d,0xac,0xdf,0x71,0x64,0x34,0xdb,0x26,0x82,0x75,0xdf,0x3e,0x1d,0xc1,0x77,0xaf,0x42,},{0x7f,0xc8,0x8b,0x1f,0x7b,0x3f,0x11,0xc6,0x29,0xbe,0x67,0x1c,0x21,0x62,0x1f,0x5c,0x10,0x67,0x2f,0xaf,0xc8,0x49,0x2d,0xa8,0x85,0x74,0x20,0x59,0xee,0x67,0x74,0xcf,},{0x4b,0x22,0x99,0x51,0xef,0x26,0x2f,0x16,0x97,0x8f,0x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0x32,0xf2,0xc3,0x66,0x0b,},56,"\x7f\x31\x8d\xbd\x12\x1c\x08\xbf\xdd\xfe\xff\x4f\x6a\xff\x4e\x45\x79\x32\x51\xf8\xab\xf6\x58\x40\x33\x58\x23\x89\x84\x36\x00\x54\xf2\xa8\x62\xc5\xbb\x83\xed\x89\x02\x5d\x20\x14\xa7\xa0\xce\xe5\x0d\xa3\xcb\x0e\x76\xbb\xb6\xbf"},
- {{0x47,0xad,0xc6,0xd6,0xbf,0x57,0x1e,0xe9,0x57,0x0c,0xa0,0xf7,0x5b,0x60,0x4a,0xc4,0x3e,0x30,0x3e,0x4a,0xb3,0x39,0xca,0x9b,0x53,0xca,0xcc,0x5b,0xe4,0x5b,0x2c,0xcb,},{0xa3,0xf5,0x27,0xa1,0xc1,0xf1,0x7d,0xfe,0xed,0x92,0x27,0x73,0x47,0xc9,0xf9,0x8a,0xb4,0x75,0xde,0x17,0x55,0xb0,0xab,0x54,0x6b,0x8a,0x15,0xd0,0x1b,0x9b,0xd0,0xbe,},{0x4e,0x8c,0x31,0x83,0x43,0xc3,0x06,0xad,0xbb,0xa6,0x0c,0x92,0xb7,0x5c,0xb0,0x56,0x9b,0x92,0x19,0xd8,0xa8,0x6e,0x5d,0x57,0x75,0x2e,0xd2,0x35,0xfc,0x10,0x9a,0x43,0xc2,0xcf,0x4e,0x94,0x2c,0xac,0xf2,0x97,0x27,0x9f,0xbb,0x28,0x67,0x53,0x47,0xe0,0x80,0x27,0x72,0x2a,0x4e,0xb7,0x39,0x5e,0x00,0xa1,0x74,0x95,0xd3,0x2e,0xdf,0x0b,},57,"\xce\x49\x7c\x5f\xf5\xa7\x79\x90\xb7\xd8\xf8\x69\x9e\xb1\xf5\xd8\xc0\x58\x2f\x70\xcb\x7a\xc5\xc5\x4d\x9d\x92\x49\x13\x27\x8b\xc6\x54\xd3\x7e\xa2\x27\x59\x0e\x15\x20\x22\x17\xfc\x98\xda\xc4\xc0\xf3\xbe\x21\x83\xd1\x33\x31\x57\x39"},
- {{0x3c,0x19,0xb5,0x0b,0x0f,0xe4,0x79,0x61,0x71,0x9c,0x38,0x1d,0x0d,0x8d,0xa9,0xb9,0x86,0x9d,0x31,0x2f,0x13,0xe3,0x29,0x8b,0x97,0xfb,0x22,0xf0,0xaf,0x29,0xcb,0xbe,},{0x0f,0x7e,0xda,0x09,0x14,0x99,0x62,0x5e,0x2b,0xae,0x85,0x36,0xea,0x35,0xcd,0xa5,0x48,0x3b,0xd1,0x6a,0x9c,0x7e,0x41,0x6b,0x34,0x1d,0x6f,0x2c,0x83,0x34,0x36,0x12,},{0xef,0xbd,0x41,0xf2,0x6a,0x5d,0x62,0x68,0x55,0x16,0xf8,0x82,0xb6,0xec,0x74,0xe0,0xd5,0xa7,0x18,0x30,0xd2,0x03,0xc2,0x31,0x24,0x8f,0x26,0xe9,0x9a,0x9c,0x65,0x78,0xec,0x90,0x0d,0x68,0xcd,0xb8,0xfa,0x72,0x16,0xad,0x0d,0x24,0xf9,0xec,0xbc,0x9f,0xfa,0x65,0x53,0x51,0x66,0x65,0x82,0xf6,0x26,0x64,0x53,0x95,0xa3,0x1f,0xa7,0x04,},58,"\x8d\xdc\xd6\x30\x43\xf5\x5e\xc3\xbf\xc8\x3d\xce\xae\x69\xd8\xf8\xb3\x2f\x4c\xdb\x6e\x2a\xeb\xd9\x4b\x43\x14\xf8\xfe\x72\x87\xdc\xb6\x27\x32\xc9\x05\x2e\x75\x57\xfe\x63\x53\x43\x38\xef\xb5\xb6\x25\x4c\x5d\x41\xd2\x69\x0c\xf5\x14\x4f"},
- {{0x34,0xe1,0xe9,0xd5,0x39,0x10,0x7e,0xb8,0x6b,0x39,0x3a,0x5c,0xce,0xa1,0x49,0x6d,0x35,0xbc,0x7d,0x5e,0x9a,0x8c,0x51,0x59,0xd9,0x57,0xe4,0xe5,0x85,0x2b,0x3e,0xb0,},{0x0e,0xcb,0x26,0x01,0xd5,0xf7,0x04,0x74,0x28,0xe9,0xf9,0x09,0x88,0x3a,0x12,0x42,0x00,0x85,0xf0,0x4e,0xe2,0xa8,0x8b,0x6d,0x95,0xd3,0xd7,0xf2,0xc9,0x32,0xbd,0x76,},{0x32,0xd2,0x29,0x04,0xd3,0xe7,0x01,0x2d,0x6f,0x5a,0x44,0x1b,0x0b,0x42,0x28,0x06,0x4a,0x5c,0xf9,0x5b,0x72,0x3a,0x66,0xb0,0x48,0xa0,0x87,0xec,0xd5,0x59,0x20,0xc3,0x1c,0x20,0x4c,0x3f,0x20,0x06,0x89,0x1a,0x85,0xdd,0x19,0x32,0xe3,0xf1,0xd6,0x14,0xcf,0xd6,0x33,0xb5,0xe6,0x32,0x91,0xc6,0xd8,0x16,0x6f,0x30,0x11,0x43,0x1e,0x09,},59,"\xa6\xd4\xd0\x54\x2c\xfe\x0d\x24\x0a\x90\x50\x7d\xeb\xac\xab\xce\x7c\xbb\xd4\x87\x32\x35\x3f\x4f\xad\x82\xc7\xbb\x7d\xbd\x9d\xf8\xe7\xd9\xa1\x69\x80\xa4\x51\x86\xd8\x78\x6c\x5e\xf6\x54\x45\xbc\xc5\xb2\xad\x5f\x66\x0f\xfc\x7c\x8e\xaa\xc0"},
- {{0x49,0xdd,0x47,0x3e,0xde,0x6a,0xa3,0xc8,0x66,0x82,0x4a,0x40,0xad,0xa4,0x99,0x6c,0x23,0x9a,0x20,0xd8,0x4c,0x93,0x65,0xe4,0xf0,0xa4,0x55,0x4f,0x80,0x31,0xb9,0xcf,},{0x78,0x8d,0xe5,0x40,0x54,0x4d,0x3f,0xeb,0x0c,0x91,0x92,0x40,0xb3,0x90,0x72,0x9b,0xe4,0x87,0xe9,0x4b,0x64,0xad,0x97,0x3e,0xb6,0x5b,0x46,0x69,0xec,0xf2,0x35,0x01,},{0xd2,0xfd,0xe0,0x27,0x91,0xe7,0x20,0x85,0x25,0x07,0xfa,0xa7,0xc3,0x78,0x90,0x40,0xd9,0xef,0x86,0x64,0x63,0x21,0xf3,0x13,0xac,0x55,0x7f,0x40,0x02,0x49,0x15,0x42,0xdd,0x67,0xd0,0x5c,0x69,0x90,0xcd,0xb0,0xd4,0x95,0x50,0x1f,0xbc,0x5d,0x51,0x88,0xbf,0xbb,0x84,0xdc,0x1b,0xf6,0x09,0x8b,0xee,0x06,0x03,0xa4,0x7f,0xc2,0x69,0x0f,},60,"\x3a\x53\x59\x4f\x3f\xba\x03\x02\x93\x18\xf5\x12\xb0\x84\xa0\x71\xeb\xd6\x0b\xae\xc7\xf5\x5b\x02\x8d\xc7\x3b\xfc\x9c\x74\xe0\xca\x49\x6b\xf8\x19\xdd\x92\xab\x61\xcd\x8b\x74\xbe\x3c\x0d\x6d\xcd\x12\x8e\xfc\x5e\xd3\x34\x2c\xba\x12\x4f\x72\x6c"},
- {{0x33,0x1c,0x64,0xda,0x48,0x2b,0x6b,0x55,0x13,0x73,0xc3,0x64,0x81,0xa0,0x2d,0x81,0x36,0xec,0xad,0xbb,0x01,0xab,0x11,0x4b,0x44,0x70,0xbf,0x41,0x60,0x7a,0xc5,0x71,},{0x52,0xa0,0x0d,0x96,0xa3,0x14,0x8b,0x47,0x26,0x69,0x2d,0x9e,0xff,0x89,0x16,0x0e,0xa9,0xf9,0x9a,0x5c,0xc4,0x38,0x9f,0x36,0x1f,0xed,0x0b,0xb1,0x6a,0x42,0xd5,0x21,},{0x22,0xc9,0x9a,0xa9,0x46,0xea,0xd3,0x9a,0xc7,0x99,0x75,0x62,0x81,0x0c,0x01,0xc2,0x0b,0x46,0xbd,0x61,0x06,0x45,0xbd,0x2d,0x56,0xdc,0xdc,0xba,0xac,0xc5,0x45,0x2c,0x74,0xfb,0xf4,0xb8,0xb1,0x81,0x3b,0x0e,0x94,0xc3,0x0d,0x80,0x8c,0xe5,0x49,0x8e,0x61,0xd4,0xf7,0xcc,0xbb,0x4c,0xc5,0xf0,0x4d,0xfc,0x61,0x40,0x82,0x5a,0x96,0x00,},61,"\x20\xe1\xd0\x5a\x0d\x5b\x32\xcc\x81\x50\xb8\x11\x6c\xef\x39\x65\x9d\xd5\xfb\x44\x3a\xb1\x56\x00\xf7\x8e\x5b\x49\xc4\x53\x26\xd9\x32\x3f\x28\x50\xa6\x3c\x38\x08\x85\x94\x95\xae\x27\x3f\x58\xa5\x1e\x9d\xe9\xa1\x45\xd7\x74\xb4\x0b\xa9\xd7\x53\xd3"},
- {{0x5c,0x0b,0x96,0xf2,0xaf,0x87,0x12,0x12,0x2c,0xf7,0x43,0xc8,0xf8,0xdc,0x77,0xb6,0xcd,0x55,0x70,0xa7,0xde,0x13,0x29,0x7b,0xb3,0xdd,0xe1,0x88,0x62,0x13,0xcc,0xe2,},{0x05,0x10,0xea,0xf5,0x7d,0x73,0x01,0xb0,0xe1,0xd5,0x27,0x03,0x9b,0xf4,0xc6,0xe2,0x92,0x30,0x0a,0x3a,0x61,0xb4,0x76,0x54,0x34,0xf3,0x20,0x3c,0x10,0x03,0x51,0xb1,},{0x06,0xe5,0xd8,0x43,0x6a,0xc7,0x70,0x5b,0x3a,0x90,0xf1,0x63,0x1c,0xdd,0x38,0xec,0x1a,0x3f,0xa4,0x97,0x78,0xa9,0xb9,0xf2,0xfa,0x5e,0xbe,0xa4,0xe7,0xd5,0x60,0xad,0xa7,0xdd,0x26,0xff,0x42,0xfa,0xfa,0x8b,0xa4,0x20,0x32,0x37,0x42,0x76,0x1a,0xca,0x69,0x04,0x94,0x0d,0xc2,0x1b,0xbe,0xf6,0x3f,0xf7,0x2d,0xaa,0xb4,0x5d,0x43,0x0b,},62,"\x54\xe0\xca\xa8\xe6\x39\x19\xca\x61\x4b\x2b\xfd\x30\x8c\xcf\xe5\x0c\x9e\xa8\x88\xe1\xee\x44\x46\xd6\x82\xcb\x50\x34\x62\x7f\x97\xb0\x53\x92\xc0\x4e\x83\x55\x56\xc3\x1c\x52\x81\x6a\x48\xe4\xfb\x19\x66\x93\x20\x6b\x8a\xfb\x44\x08\x66\x2b\x3c\xb5\x75"},
- {{0xde,0x84,0xf2,0x43,0x5f,0x78,0xde,0xdb,0x87,0xda,0x18,0x19,0x4f,0xf6,0xa3,0x36,0xf0,0x81,0x11,0x15,0x0d,0xef,0x90,0x1c,0x1a,0xc4,0x18,0x14,0x6e,0xb7,0xb5,0x4a,},{0xd3,0xa9,0x2b,0xba,0xa4,0xd6,0x3a,0xf7,0x9c,0x22,0x26,0xa7,0x23,0x6e,0x64,0x27,0x42,0x8d,0xf8,0xb3,0x62,0x42,0x7f,0x87,0x30,0x23,0xb2,0x2d,0x2f,0x5e,0x03,0xf2,},{0x47,0x1e,0xbc,0x97,0x3c,0xfd,0xac,0xee,0xc0,0x72,0x79,0x30,0x73,0x68,0xb7,0x3b,0xe3,0x5b,0xc6,0xf8,0xd8,0x31,0x2b,0x70,0x15,0x05,0x67,0x36,0x90,0x96,0x70,0x6d,0xc4,0x71,0x12,0x6c,0x35,0x76,0xf9,0xf0,0xeb,0x55,0x0d,0xf5,0xac,0x6a,0x52,0x51,0x81,0x11,0x00,0x29,0xdd,0x1f,0xc1,0x11,0x74,0xd1,0xaa,0xce,0xd4,0x8d,0x63,0x0f,},63,"\x20\x51\x35\xec\x7f\x41\x7c\x85\x80\x72\xd5\x23\x3f\xb3\x64\x82\xd4\x90\x6a\xbd\x60\xa7\x4a\x49\x8c\x34\x7f\xf2\x48\xdf\xa2\x72\x2c\xa7\x4e\x87\x9d\xe3\x31\x69\xfa\xdc\x7c\xd4\x4d\x6c\x94\xa1\x7d\x16\xe1\xe6\x30\x82\x4b\xa3\xe0\xdf\x22\xed\x68\xea\xab"},
- {{0xba,0x4d,0x6e,0x67,0xb2,0xce,0x67,0xa1,0xe4,0x43,0x26,0x49,0x40,0x44,0xf3,0x7a,0x44,0x2f,0x3b,0x81,0x72,0x5b,0xc1,0xf9,0x34,0x14,0x62,0x71,0x8b,0x55,0xee,0x20,},{0xf7,0x3f,0xa0,0x76,0xf8,0x4b,0x6d,0xb6,0x75,0xa5,0xfd,0xa5,0xad,0x67,0xe3,0x51,0xa4,0x1e,0x8e,0x7f,0x29,0xad,0xd1,0x68,0x09,0xca,0x01,0x03,0x87,0xe9,0xc6,0xcc,},{0x57,0xb9,0xd2,0xa7,0x11,0x20,0x7f,0x83,0x74,0x21,0xba,0xe7,0xdd,0x48,0xea,0xa1,0x8e,0xab,0x1a,0x9a,0x70,0xa0,0xf1,0x30,0x58,0x06,0xfe,0xe1,0x7b,0x45,0x8f,0x3a,0x09,0x64,0xb3,0x02,0xd1,0x83,0x4d,0x3e,0x0a,0xc9,0xe8,0x49,0x6f,0x00,0x0b,0x77,0xf0,0x08,0x3b,0x41,0xf8,0xa9,0x57,0xe6,0x32,0xfb,0xc7,0x84,0x0e,0xee,0x6a,0x06,},64,"\x4b\xaf\xda\xc9\x09\x9d\x40\x57\xed\x6d\xd0\x8b\xca\xee\x87\x56\xe9\xa4\x0f\x2c\xb9\x59\x80\x20\xeb\x95\x01\x95\x28\x40\x9b\xbe\xa3\x8b\x38\x4a\x59\xf1\x19\xf5\x72\x97\xbf\xb2\xfa\x14\x2f\xc7\xbb\x1d\x90\xdb\xdd\xde\x77\x2b\xcd\xe4\x8c\x56\x70\xd5\xfa\x13"},
- {{0x0d,0x13,0x1c,0x45,0xae,0xa6,0xf3,0xa4,0xe1,0xb9,0xa2,0xcf,0x60,0xc5,0x51,0x04,0x58,0x7e,0xfa,0xa8,0x46,0xb2,0x22,0xbf,0x0a,0x7b,0x74,0xce,0x7a,0x3f,0x63,0xb6,},{0x3c,0x67,0x29,0xdb,0xe9,0x3b,0x49,0x9c,0x4e,0x61,0x4a,0x2f,0x21,0xbe,0xb7,0x29,0x43,0x8d,0x49,0x8e,0x1a,0xc8,0xd1,0x4c,0xba,0xd9,0x71,0x7a,0x5d,0xbd,0x97,0xcd,},{0xa9,0xc5,0xee,0x86,0xfb,0x06,0xd9,0xe4,0x6b,0x37,0x9c,0x32,0xdd,0xa7,0xc9,0x2c,0x9c,0x13,0xdb,0x27,0x4d,0xc2,0x41,0x16,0xfb,0xdd,0x87,0x86,0x96,0x04,0x54,0x88,0xcc,0x75,0xa5,0x2f,0xff,0x67,0xd1,0xa5,0x11,0x3d,0x06,0xe3,0x33,0xac,0x67,0xff,0x66,0x4b,0x3f,0x2a,0x40,0x5f,0xa1,0xd1,0x4d,0xd5,0xbb,0xb9,0x74,0x09,0xb6,0x06,},65,"\xb4\x29\x1d\x08\xb8\x8f\xb2\xf7\xb8\xf9\x9d\x0d\xce\x40\x07\x9f\xcb\xab\x71\x8b\xbd\x8f\x4e\x8e\xab\xc3\xc1\x42\x8b\x6a\x07\x1f\xb2\xa3\xc8\xeb\xa1\xca\xcc\xcf\xa8\x71\xb3\x65\xc7\x08\xbe\xf2\x68\x5b\xc1\x3e\x6b\x80\xbc\x14\xa5\xf2\x49\x17\x0f\xfc\x56\xd0\x14"},
+template <class E, class D> class VariableRoundsCipherFactory : public CipherFactory
+{
+public:
+ VariableRoundsCipherFactory(unsigned int keylen=0, unsigned int rounds=0) :
+ m_keylen(keylen ? keylen : static_cast<unsigned int>(E::DEFAULT_KEYLENGTH)),
+ m_rounds(rounds ? rounds : static_cast<unsigned int>(E::DEFAULT_ROUNDS)) {}
+
+ unsigned int BlockSize() const {return static_cast<unsigned int>(E::BLOCKSIZE);}
+ unsigned int KeyLength() const {return m_keylen;}
+
+ BlockTransformation* NewEncryption(const byte *keyStr) const
+ {return new E(keyStr, m_keylen, m_rounds);}
+ BlockTransformation* NewDecryption(const byte *keyStr) const
+ {return new D(keyStr, m_keylen, m_rounds);}
+
+ unsigned int m_keylen, m_rounds;
};
-bool TestCryptoSign()
+bool BlockTransformationTest(const CipherFactory &cg, BufferedTransformation &valdata, unsigned int tuples = 0xffff)
{
- // https://github.com/jedisct1/libsodium/blob/master/test/default/sign.c
- const unsigned int MAX_MESSAGE = 65; // Sync with test data
+ HexEncoder output(new FileSink(std::cout));
+ SecByteBlock plain(cg.BlockSize()), cipher(cg.BlockSize()), out(cg.BlockSize()), outplain(cg.BlockSize());
+ SecByteBlock key(cg.KeyLength());
+ bool pass=true, fail;
+
+ while (valdata.MaxRetrievable() && tuples--)
+ {
+ (void)valdata.Get(key, cg.KeyLength());
+ (void)valdata.Get(plain, cg.BlockSize());
+ (void)valdata.Get(cipher, cg.BlockSize());
+
+ member_ptr<BlockTransformation> transE(cg.NewEncryption(key));
+ transE->ProcessBlock(plain, out);
+ fail = memcmp(out, cipher, cg.BlockSize()) != 0;
+
+ member_ptr<BlockTransformation> transD(cg.NewDecryption(key));
+ transD->ProcessBlock(out, outplain);
+ fail=fail || memcmp(outplain, plain, cg.BlockSize());
+
+ pass = pass && !fail;
+
+ std::cout << (fail ? "FAILED " : "passed ");
+ output.Put(key, cg.KeyLength());
+ std::cout << " ";
+ output.Put(outplain, cg.BlockSize());
+ std::cout << " ";
+ output.Put(out, cg.BlockSize());
+ std::cout << std::endl;
+ }
+ return pass;
+}
- byte pk[crypto_sign_PUBLICKEYBYTES];
- byte sk[crypto_sign_SECRETKEYBYTES];
- SecByteBlock sm(MAX_MESSAGE+crypto_sign_BYTES);
- SecByteBlock rm(MAX_MESSAGE+crypto_sign_BYTES);
+class FilterTester : public Unflushable<Sink>
+{
+public:
+ FilterTester(const byte *validOutput, size_t outputLen)
+ : validOutput(validOutput), outputLen(outputLen), counter(0), fail(false) {}
+ void PutByte(byte inByte)
+ {
+ if (counter >= outputLen || validOutput[counter] != inByte)
+ {
+ std::cerr << "incorrect output " << counter << ", " << (word16)validOutput[counter] << ", " << (word16)inByte << "\n";
+ fail = true;
+ CRYPTOPP_ASSERT(false);
+ }
+ counter++;
+ }
+ size_t Put2(const byte *inString, size_t length, int messageEnd, bool blocking)
+ {
+ CRYPTOPP_UNUSED(messageEnd), CRYPTOPP_UNUSED(blocking);
+
+ while (length--)
+ FilterTester::PutByte(*inString++);
+
+ if (messageEnd)
+ if (counter != outputLen)
+ {
+ fail = true;
+ CRYPTOPP_ASSERT(false);
+ }
+
+ return 0;
+ }
+ bool GetResult()
+ {
+ return !fail;
+ }
+
+ const byte *validOutput;
+ size_t outputLen, counter;
+ bool fail;
+};
- bool pass = true, fail; int rc;
+bool TestFilter(BufferedTransformation &bt, const byte *in, size_t inLen, const byte *out, size_t outLen)
+{
+ FilterTester *ft;
+ bt.Attach(ft = new FilterTester(out, outLen));
+
+ while (inLen)
+ {
+ size_t randomLen = GlobalRNG().GenerateWord32(0, (word32)inLen);
+ bt.Put(in, randomLen);
+ in += randomLen;
+ inLen -= randomLen;
+ }
+ bt.MessageEnd();
+ return ft->GetResult();
+}
+
+bool ValidateDES()
+{
+ std::cout << "\nDES validation suite running...\n\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/descert.dat", true, new HexDecoder);
+ bool pass = BlockTransformationTest(FixedRoundsCipherFactory<DESEncryption, DESDecryption>(), valdata);
- for (unsigned int i=0; i<COUNTOF(test_data); ++i)
- {
- const TestData& data = test_data[i];
- std::memcpy(sk, data.sk, crypto_sign_SEEDBYTES);
- std::memcpy(sk+crypto_sign_SEEDBYTES, data.pk, crypto_sign_PUBLICKEYBYTES);
- std::memcpy(pk, data.pk, crypto_sign_PUBLICKEYBYTES);
+ std::cout << "\nTesting EDE2, EDE3, and XEX3 variants...\n\n";
- const byte* m = reinterpret_cast<const byte*>(data.msg);
- const word64 l = data.len;
- word64 smlen;
+ FileSource valdata1(CRYPTOPP_DATA_DIR "TestData/3desval.dat", true, new HexDecoder);
+ pass = BlockTransformationTest(FixedRoundsCipherFactory<DES_EDE2_Encryption, DES_EDE2_Decryption>(), valdata1, 1) && pass;
+ pass = BlockTransformationTest(FixedRoundsCipherFactory<DES_EDE3_Encryption, DES_EDE3_Decryption>(), valdata1, 1) && pass;
+ pass = BlockTransformationTest(FixedRoundsCipherFactory<DES_XEX3_Encryption, DES_XEX3_Decryption>(), valdata1, 1) && pass;
- rc = crypto_sign(sm, &smlen, m, l, sk);
- fail = (rc != 0); pass = !fail && pass;
+ return pass;
+}
+
+bool TestModeIV(SymmetricCipher &e, SymmetricCipher &d)
+{
+ SecByteBlock lastIV, iv(e.IVSize());
+ StreamTransformationFilter filter(e, new StreamTransformationFilter(d));
- word64 s = STDMIN(smlen, (word64)crypto_sign_BYTES);
- pass = (s >= crypto_sign_BYTES) && pass;
+ // Enterprise Analysis finding on the stack based array
+ const int BUF_SIZE=20480U;
+ AlignedSecByteBlock plaintext(BUF_SIZE);
- fail = std::memcmp(sm, data.sig, (size_t)s) != 0;
- pass = !fail && pass;
+ for (unsigned int i=1; i<BUF_SIZE; i*=2)
+ {
+ e.GetNextIV(GlobalRNG(), iv);
+ if (iv == lastIV)
+ return false;
+ else
+ lastIV = iv;
- word64 rmlen;
- rc = crypto_sign_open(rm, &rmlen, sm, smlen, pk);
- fail = (rc != 0); pass = !fail && pass;
+ e.Resynchronize(iv);
+ d.Resynchronize(iv);
- pass = (l == rmlen) && pass;
- fail = std::memcmp(m, rm, (size_t)STDMIN(l, rmlen)) != 0;
- pass = !fail && pass;
- }
+ unsigned int length = STDMAX(GlobalRNG().GenerateWord32(0, i), (word32)e.MinLastBlockSize());
+ GlobalRNG().GenerateBlock(plaintext, length);
- return pass;
+ if (!TestFilter(filter, plaintext, length, plaintext, length))
+ return false;
+ }
+
+ return true;
}
-bool TestCryptoSignKeys()
+bool ValidateCipherModes()
{
- // https://github.com/jedisct1/libsodium/blob/master/test/default/sign.c
- const unsigned int MAX_TEST = 64;
- const unsigned int MAX_MESSAGE = 4096;
+ std::cout << "\nTesting DES modes...\n\n";
+ const byte key[] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef};
+ const byte iv[] = {0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef};
+ const byte plain[] = { // "Now is the time for all " without tailing 0
+ 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+ 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+ 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20};
+ DESEncryption desE(key);
+ DESDecryption desD(key);
+ bool pass=true, fail;
+
+ {
+ // from FIPS 81
+ const byte encrypted[] = {
+ 0x3f, 0xa4, 0x0e, 0x8a, 0x98, 0x4d, 0x48, 0x15,
+ 0x6a, 0x27, 0x17, 0x87, 0xab, 0x88, 0x83, 0xf9,
+ 0x89, 0x3d, 0x51, 0xec, 0x4b, 0x56, 0x3b, 0x53};
+
+ ECB_Mode_ExternalCipher::Encryption modeE(desE);
+ fail = !TestFilter(StreamTransformationFilter(modeE, NULLPTR, StreamTransformationFilter::NO_PADDING).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "ECB encryption" << std::endl;
+
+ ECB_Mode_ExternalCipher::Decryption modeD(desD);
+ fail = !TestFilter(StreamTransformationFilter(modeD, NULLPTR, StreamTransformationFilter::NO_PADDING).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "ECB decryption" << std::endl;
+ }
+ {
+ // from FIPS 81
+ const byte encrypted[] = {
+ 0xE5, 0xC7, 0xCD, 0xDE, 0x87, 0x2B, 0xF2, 0x7C,
+ 0x43, 0xE9, 0x34, 0x00, 0x8C, 0x38, 0x9C, 0x0F,
+ 0x68, 0x37, 0x88, 0x49, 0x9A, 0x7C, 0x05, 0xF6};
+
+ CBC_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE, NULLPTR, StreamTransformationFilter::NO_PADDING).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC encryption with no padding" << std::endl;
+
+ CBC_Mode_ExternalCipher::Decryption modeD(desD, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD, NULLPTR, StreamTransformationFilter::NO_PADDING).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC decryption with no padding" << std::endl;
+
+ fail = !TestModeIV(modeE, modeD);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC mode IV generation" << std::endl;
+ }
+ {
+ // generated with Crypto++, matches FIPS 81
+ // but has extra 8 bytes as result of padding
+ const byte encrypted[] = {
+ 0xE5, 0xC7, 0xCD, 0xDE, 0x87, 0x2B, 0xF2, 0x7C,
+ 0x43, 0xE9, 0x34, 0x00, 0x8C, 0x38, 0x9C, 0x0F,
+ 0x68, 0x37, 0x88, 0x49, 0x9A, 0x7C, 0x05, 0xF6,
+ 0x62, 0xC1, 0x6A, 0x27, 0xE4, 0xFC, 0xF2, 0x77};
+
+ CBC_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC encryption with PKCS #7 padding" << std::endl;
+
+ CBC_Mode_ExternalCipher::Decryption modeD(desD, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC decryption with PKCS #7 padding" << std::endl;
+ }
+ {
+ // generated with Crypto++ 5.2, matches FIPS 81
+ // but has extra 8 bytes as result of padding
+ const byte encrypted[] = {
+ 0xE5, 0xC7, 0xCD, 0xDE, 0x87, 0x2B, 0xF2, 0x7C,
+ 0x43, 0xE9, 0x34, 0x00, 0x8C, 0x38, 0x9C, 0x0F,
+ 0x68, 0x37, 0x88, 0x49, 0x9A, 0x7C, 0x05, 0xF6,
+ 0xcf, 0xb7, 0xc7, 0x64, 0x0e, 0x7c, 0xd9, 0xa7};
+
+ CBC_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE, NULLPTR, StreamTransformationFilter::ONE_AND_ZEROS_PADDING).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC encryption with one-and-zeros padding" << std::endl;
+
+ CBC_Mode_ExternalCipher::Decryption modeD(desD, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD, NULLPTR, StreamTransformationFilter::ONE_AND_ZEROS_PADDING).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC decryption with one-and-zeros padding" << std::endl;
+ }
+ {
+ const byte plain_1[] = {'a', 0, 0, 0, 0, 0, 0, 0};
+ // generated with Crypto++
+ const byte encrypted[] = {
+ 0x9B, 0x47, 0x57, 0x59, 0xD6, 0x9C, 0xF6, 0xD0};
+
+ CBC_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE, NULLPTR, StreamTransformationFilter::ZEROS_PADDING).Ref(),
+ plain_1, 1, encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC encryption with zeros padding" << std::endl;
+
+ CBC_Mode_ExternalCipher::Decryption modeD(desD, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD, NULLPTR, StreamTransformationFilter::ZEROS_PADDING).Ref(),
+ encrypted, sizeof(encrypted), plain_1, sizeof(plain_1));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC decryption with zeros padding" << std::endl;
+ }
+ {
+ // generated with Crypto++, matches FIPS 81
+ // but with last two blocks swapped as result of CTS
+ const byte encrypted[] = {
+ 0xE5, 0xC7, 0xCD, 0xDE, 0x87, 0x2B, 0xF2, 0x7C,
+ 0x68, 0x37, 0x88, 0x49, 0x9A, 0x7C, 0x05, 0xF6,
+ 0x43, 0xE9, 0x34, 0x00, 0x8C, 0x38, 0x9C, 0x0F};
+
+ CBC_CTS_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC encryption with ciphertext stealing (CTS)" << std::endl;
+
+ CBC_CTS_Mode_ExternalCipher::Decryption modeD(desD, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC decryption with ciphertext stealing (CTS)" << std::endl;
+
+ fail = !TestModeIV(modeE, modeD);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC CTS IV generation" << std::endl;
+ }
+ {
+ // generated with Crypto++
+ const byte decryptionIV[] = {0x4D, 0xD0, 0xAC, 0x8F, 0x47, 0xCF, 0x79, 0xCE};
+ const byte encrypted[] = {0x12, 0x34, 0x56};
+
+ byte stolenIV[8];
+
+ CBC_CTS_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ modeE.SetStolenIV(stolenIV);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain, 3, encrypted, sizeof(encrypted));
+ fail = memcmp(stolenIV, decryptionIV, 8) != 0 || fail;
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC encryption with ciphertext and IV stealing" << std::endl;
+
+ CBC_CTS_Mode_ExternalCipher::Decryption modeD(desD, stolenIV);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain, 3);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC decryption with ciphertext and IV stealing" << std::endl;
+ }
+ {
+ const byte encrypted[] = { // from FIPS 81
+ 0xF3,0x09,0x62,0x49,0xC7,0xF4,0x6E,0x51,
+ 0xA6,0x9E,0x83,0x9B,0x1A,0x92,0xF7,0x84,
+ 0x03,0x46,0x71,0x33,0x89,0x8E,0xA6,0x22};
+
+ CFB_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CFB encryption" << std::endl;
+
+ CFB_Mode_ExternalCipher::Decryption modeD(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CFB decryption" << std::endl;
+
+ fail = !TestModeIV(modeE, modeD);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CFB mode IV generation" << std::endl;
+ }
+ {
+ const byte plain_2[] = { // "Now is the." without tailing 0
+ 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,0x68,0x65};
+ const byte encrypted[] = { // from FIPS 81
+ 0xf3,0x1f,0xda,0x07,0x01,0x14,0x62,0xee,0x18,0x7f};
+
+ CFB_Mode_ExternalCipher::Encryption modeE(desE, iv, 1);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain_2, sizeof(plain_2), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CFB (8-bit feedback) encryption" << std::endl;
+
+ CFB_Mode_ExternalCipher::Decryption modeD(desE, iv, 1);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain_2, sizeof(plain_2));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CFB (8-bit feedback) decryption" << std::endl;
+
+ fail = !TestModeIV(modeE, modeD);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CFB (8-bit feedback) IV generation" << std::endl;
+ }
+ {
+ const byte encrypted[] = { // from Eric Young's libdes
+ 0xf3,0x09,0x62,0x49,0xc7,0xf4,0x6e,0x51,
+ 0x35,0xf2,0x4a,0x24,0x2e,0xeb,0x3d,0x3f,
+ 0x3d,0x6d,0x5b,0xe3,0x25,0x5a,0xf8,0xc3};
+
+ OFB_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "OFB encryption" << std::endl;
+
+ OFB_Mode_ExternalCipher::Decryption modeD(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "OFB decryption" << std::endl;
+
+ fail = !TestModeIV(modeE, modeD);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "OFB IV generation" << std::endl;
+ }
+ {
+ const byte encrypted[] = { // generated with Crypto++
+ 0xF3, 0x09, 0x62, 0x49, 0xC7, 0xF4, 0x6E, 0x51,
+ 0x16, 0x3A, 0x8C, 0xA0, 0xFF, 0xC9, 0x4C, 0x27,
+ 0xFA, 0x2F, 0x80, 0xF4, 0x80, 0xB8, 0x6F, 0x75};
+
+ CTR_Mode_ExternalCipher::Encryption modeE(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeE).Ref(),
+ plain, sizeof(plain), encrypted, sizeof(encrypted));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "Counter Mode encryption" << std::endl;
+
+ CTR_Mode_ExternalCipher::Decryption modeD(desE, iv);
+ fail = !TestFilter(StreamTransformationFilter(modeD).Ref(),
+ encrypted, sizeof(encrypted), plain, sizeof(plain));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "Counter Mode decryption" << std::endl;
+
+ fail = !TestModeIV(modeE, modeD);
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "Counter Mode IV generation" << std::endl;
+ }
+ {
+ const byte plain_3[] = { // "7654321 Now is the time for "
+ 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20,
+ 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74,
+ 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20,
+ 0x66, 0x6f, 0x72, 0x20};
+ const byte mac1[] = { // from FIPS 113
+ 0xf1, 0xd3, 0x0f, 0x68, 0x49, 0x31, 0x2c, 0xa4};
+ const byte mac2[] = { // generated with Crypto++
+ 0x35, 0x80, 0xC5, 0xC4, 0x6B, 0x81, 0x24, 0xE2};
+
+ CBC_MAC<DES> cbcmac(key);
+ HashFilter cbcmacFilter(cbcmac);
+ fail = !TestFilter(cbcmacFilter, plain_3, sizeof(plain_3), mac1, sizeof(mac1));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "CBC MAC" << std::endl;
+
+ DMAC<DES> dmac(key);
+ HashFilter dmacFilter(dmac);
+ fail = !TestFilter(dmacFilter, plain_3, sizeof(plain_3), mac2, sizeof(mac2));
+ pass = pass && !fail;
+ std::cout << (fail ? "FAILED " : "passed ") << "DMAC" << std::endl;
+ }
+
+ return pass;
+}
- byte pk[crypto_sign_PUBLICKEYBYTES];
- byte sk[crypto_sign_SECRETKEYBYTES];
+bool ValidateIDEA()
+{
+ std::cout << "\nIDEA validation suite running...\n\n";
- bool pass = true, fail; int rc;
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/ideaval.dat", true, new HexDecoder);
+ return BlockTransformationTest(FixedRoundsCipherFactory<IDEAEncryption, IDEADecryption>(), valdata);
+}
- for (unsigned int i=0; i<MAX_TEST; ++i)
- {
- fail = (crypto_sign_keypair(pk, sk) != 0);
- pass = !fail && pass;
+bool ValidateSAFER()
+{
+ std::cout << "\nSAFER validation suite running...\n\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/saferval.dat", true, new HexDecoder);
+ bool pass = true;
+ pass = BlockTransformationTest(VariableRoundsCipherFactory<SAFER_K_Encryption, SAFER_K_Decryption>(8,6), valdata, 4) && pass;
+ pass = BlockTransformationTest(VariableRoundsCipherFactory<SAFER_K_Encryption, SAFER_K_Decryption>(16,12), valdata, 4) && pass;
+ pass = BlockTransformationTest(VariableRoundsCipherFactory<SAFER_SK_Encryption, SAFER_SK_Decryption>(8,6), valdata, 4) && pass;
+ pass = BlockTransformationTest(VariableRoundsCipherFactory<SAFER_SK_Encryption, SAFER_SK_Decryption>(16,10), valdata, 4) && pass;
+ return pass;
+}
- byte xk[crypto_sign_PUBLICKEYBYTES];
- fail = (crypto_sign_sk2pk(xk, sk) != 0);
- pass = !fail && pass;
+bool ValidateRC2()
+{
+ std::cout << "\nRC2 validation suite running...\n\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/rc2val.dat", true, new HexDecoder);
+ HexEncoder output(new FileSink(std::cout));
+ SecByteBlock plain(RC2Encryption::BLOCKSIZE), cipher(RC2Encryption::BLOCKSIZE), out(RC2Encryption::BLOCKSIZE), outplain(RC2Encryption::BLOCKSIZE);
+ SecByteBlock key(128);
+ bool pass=true, fail;
+
+ while (valdata.MaxRetrievable())
+ {
+ byte keyLen, effectiveLen;
+
+ (void)valdata.Get(keyLen);
+ (void)valdata.Get(effectiveLen);
+ (void)valdata.Get(key, keyLen);
+ (void)valdata.Get(plain, RC2Encryption::BLOCKSIZE);
+ (void)valdata.Get(cipher, RC2Encryption::BLOCKSIZE);
+
+ member_ptr<BlockTransformation> transE(new RC2Encryption(key, keyLen, effectiveLen));
+ transE->ProcessBlock(plain, out);
+ fail = memcmp(out, cipher, RC2Encryption::BLOCKSIZE) != 0;
+
+ member_ptr<BlockTransformation> transD(new RC2Decryption(key, keyLen, effectiveLen));
+ transD->ProcessBlock(out, outplain);
+ fail=fail || memcmp(outplain, plain, RC2Encryption::BLOCKSIZE);
+
+ pass = pass && !fail;
+
+ std::cout << (fail ? "FAILED " : "passed ");
+ output.Put(key, keyLen);
+ std::cout << " ";
+ output.Put(outplain, RC2Encryption::BLOCKSIZE);
+ std::cout << " ";
+ output.Put(out, RC2Encryption::BLOCKSIZE);
+ std::cout << std::endl;
+ }
+ return pass;
+}
- fail = std::memcmp(xk, pk, sizeof(xk)) != 0;
- pass = !fail && pass;
+bool ValidateARC4()
+{
+ unsigned char Key0[] = {0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef };
+ unsigned char Input0[]={0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef};
+ unsigned char Output0[] = {0x75,0xb7,0x87,0x80,0x99,0xe0,0xc5,0x96};
+
+ unsigned char Key1[]={0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef};
+ unsigned char Input1[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ unsigned char Output1[]={0x74,0x94,0xc2,0xe7,0x10,0x4b,0x08,0x79};
+
+ unsigned char Key2[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ unsigned char Input2[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ unsigned char Output2[]={0xde,0x18,0x89,0x41,0xa3,0x37,0x5d,0x3a};
+
+ unsigned char Key3[]={0xef,0x01,0x23,0x45};
+ unsigned char Input3[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
+ unsigned char Output3[]={0xd6,0xa1,0x41,0xa7,0xec,0x3c,0x38,0xdf,0xbd,0x61};
+
+ unsigned char Key4[]={ 0x01,0x23,0x45,0x67,0x89,0xab, 0xcd,0xef };
+ unsigned char Input4[] =
+ {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x01};
+ unsigned char Output4[]= {
+ 0x75,0x95,0xc3,0xe6,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74,0x86,0xd4,0x9b,0x9c,
+ 0x4b,0xad,0x9b,0xa2,0x4b,0x96,0xab,0xf9,0x24,0x37,
+ 0x2c,0x8a,0x8f,0xff,0xb1,0x0d,0x55,0x35,0x49,0x00,
+ 0xa7,0x7a,0x3d,0xb5,0xf2,0x05,0xe1,0xb9,0x9f,0xcd,
+ 0x86,0x60,0x86,0x3a,0x15,0x9a,0xd4,0xab,0xe4,0x0f,
+ 0xa4,0x89,0x34,0x16,0x3d,0xdd,0xe5,0x42,0xa6,0x58,
+ 0x55,0x40,0xfd,0x68,0x3c,0xbf,0xd8,0xc0,0x0f,0x12,
+ 0x12,0x9a,0x28,0x4d,0xea,0xcc,0x4c,0xde,0xfe,0x58,
+ 0xbe,0x71,0x37,0x54,0x1c,0x04,0x71,0x26,0xc8,0xd4,
+ 0x9e,0x27,0x55,0xab,0x18,0x1a,0xb7,0xe9,0x40,0xb0,
+ 0xc0};
+
+ member_ptr<Weak::ARC4> arc4;
+ bool pass=true, fail;
+ unsigned int i;
+
+ std::cout << "\nARC4 validation suite running...\n\n";
+
+ arc4.reset(new Weak::ARC4(Key0, sizeof(Key0)));
+ arc4->ProcessString(Input0, sizeof(Input0));
+ fail = memcmp(Input0, Output0, sizeof(Input0)) != 0;
+ std::cout << (fail ? "FAILED" : "passed") << " Test 0" << std::endl;
+ pass = pass && !fail;
+
+ arc4.reset(new Weak::ARC4(Key1, sizeof(Key1)));
+ arc4->ProcessString(Key1, Input1, sizeof(Key1));
+ fail = memcmp(Output1, Key1, sizeof(Key1)) != 0;
+ std::cout << (fail ? "FAILED" : "passed") << " Test 1" << std::endl;
+ pass = pass && !fail;
+
+ arc4.reset(new Weak::ARC4(Key2, sizeof(Key2)));
+ for (i=0, fail=false; i<sizeof(Input2); i++)
+ if (arc4->ProcessByte(Input2[i]) != Output2[i])
+ fail = true;
+ std::cout << (fail ? "FAILED" : "passed") << " Test 2" << std::endl;
+ pass = pass && !fail;
+
+ arc4.reset(new Weak::ARC4(Key3, sizeof(Key3)));
+ for (i=0, fail=false; i<sizeof(Input3); i++)
+ if (arc4->ProcessByte(Input3[i]) != Output3[i])
+ fail = true;
+ std::cout << (fail ? "FAILED" : "passed") << " Test 3" << std::endl;
+ pass = pass && !fail;
+
+ arc4.reset(new Weak::ARC4(Key4, sizeof(Key4)));
+ for (i=0, fail=false; i<sizeof(Input4); i++)
+ if (arc4->ProcessByte(Input4[i]) != Output4[i])
+ fail = true;
+ std::cout << (fail ? "FAILED" : "passed") << " Test 4" << std::endl;
+ pass = pass && !fail;
+
+ return pass;
+}
- const word32 len = (i == 0 ? 0 : GlobalRNG().GenerateWord32(1, MAX_MESSAGE));
- SecByteBlock m(len), sm(len+crypto_sign_BYTES), rm(len+crypto_sign_BYTES);
- if (len) { GlobalRNG().GenerateBlock(m, len); }
+bool ValidateRC5()
+{
+ std::cout << "\nRC5 validation suite running...\n\n";
+ bool pass1 = true, pass2 = true;
+
+ RC5Encryption enc; // 0 to 2040-bits (255-bytes)
+ pass1 = RC5Encryption::DEFAULT_KEYLENGTH == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == 0 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(254) == 254 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(255) == 255 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(256) == 255 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ RC5Decryption dec;
+ pass2 = RC5Decryption::DEFAULT_KEYLENGTH == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == 0 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(254) == 254 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(255) == 255 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(256) == 255 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/rc5val.dat", true, new HexDecoder);
+ return BlockTransformationTest(VariableRoundsCipherFactory<RC5Encryption, RC5Decryption>(16, 12), valdata) && pass1 && pass2;
+}
- word64 mlen = len, smlen, rmlen;
- rc = crypto_sign(sm, &smlen, m, mlen, sk);
- fail = (rc != 0); pass = !fail && pass;
+bool ValidateRC6()
+{
+ std::cout << "\nRC6 validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ RC6Encryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ RC6Decryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/rc6val.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<RC6Encryption, RC6Decryption>(16), valdata, 2) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<RC6Encryption, RC6Decryption>(24), valdata, 2) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<RC6Encryption, RC6Decryption>(32), valdata, 2) && pass3;
+ return pass1 && pass2 && pass3;
+}
+
+bool ValidateMARS()
+{
+ std::cout << "\nMARS validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ MARSEncryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 56 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 56 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ MARSDecryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 56 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 56 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/marsval.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<MARSEncryption, MARSDecryption>(16), valdata, 4) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<MARSEncryption, MARSDecryption>(24), valdata, 3) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<MARSEncryption, MARSDecryption>(32), valdata, 2) && pass3;
+ return pass1 && pass2 && pass3;
+}
+
+bool ValidateRijndael()
+{
+ std::cout << "\nRijndael (AES) validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ RijndaelEncryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ RijndaelDecryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/rijndael.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<RijndaelEncryption, RijndaelDecryption>(16), valdata, 4) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<RijndaelEncryption, RijndaelDecryption>(24), valdata, 3) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<RijndaelEncryption, RijndaelDecryption>(32), valdata, 2) && pass3;
+ pass3 = RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/aes.txt") && pass3;
+ return pass1 && pass2 && pass3;
+}
+
+bool ValidateTwofish()
+{
+ std::cout << "\nTwofish validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ TwofishEncryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 32 && pass1;
+
+ TwofishDecryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 32 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/twofishv.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<TwofishEncryption, TwofishDecryption>(16), valdata, 4) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<TwofishEncryption, TwofishDecryption>(24), valdata, 3) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<TwofishEncryption, TwofishDecryption>(32), valdata, 2) && pass3;
+ return pass1 && pass2 && pass3;
+}
- rc = crypto_sign_open(rm, &rmlen, sm, smlen, pk);
- fail = (rc != 0); pass = !fail && pass;
+bool ValidateSerpent()
+{
+ std::cout << "\nSerpent validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ SerpentEncryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 32 && pass1;
+
+ SerpentDecryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 32 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/serpentv.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(16), valdata, 5) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(24), valdata, 4) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SerpentEncryption, SerpentDecryption>(32), valdata, 3) && pass3;
+ return pass1 && pass2 && pass3;
+}
- if(mlen && rmlen)
- {
- pass = (mlen == rmlen) && pass;
- fail = std::memcmp(m, rm, (size_t)STDMIN(mlen, rmlen)) != 0;
- pass = !fail && pass;
- }
+bool ValidateBlowfish()
+{
+ std::cout << "\nBlowfish validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true, fail;
+
+ BlowfishEncryption enc1; // 32 to 448-bits (4 to 56-bytes)
+ pass1 = enc1.StaticGetValidKeyLength(3) == 4 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(4) == 4 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(5) == 5 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(8) == 8 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(56) == 56 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(57) == 56 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(60) == 56 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(64) == 56 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(128) == 56 && pass1;
+
+ BlowfishDecryption dec1; // 32 to 448-bits (4 to 56-bytes)
+ pass2 = dec1.StaticGetValidKeyLength(3) == 4 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(4) == 4 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(5) == 5 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(8) == 8 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(56) == 56 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(57) == 56 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(60) == 56 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(64) == 56 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(128) == 56 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ HexEncoder output(new FileSink(std::cout));
+ const char *key[]={"abcdefghijklmnopqrstuvwxyz", "Who is John Galt?"};
+ byte *plain[]={(byte *)"BLOWFISH", (byte *)"\xfe\xdc\xba\x98\x76\x54\x32\x10"};
+ byte *cipher[]={(byte *)"\x32\x4e\xd0\xfe\xf4\x13\xa2\x03", (byte *)"\xcc\x91\x73\x2b\x80\x22\xf6\x84"};
+ byte out[8], outplain[8];
+
+ for (int i=0; i<2; i++)
+ {
+ ECB_Mode<Blowfish>::Encryption enc2((byte *)key[i], strlen(key[i]));
+ enc2.ProcessData(out, plain[i], 8);
+ fail = memcmp(out, cipher[i], 8) != 0;
+
+ ECB_Mode<Blowfish>::Decryption dec2((byte *)key[i], strlen(key[i]));
+ dec2.ProcessData(outplain, cipher[i], 8);
+ fail = fail || memcmp(outplain, plain[i], 8);
+ pass3 = pass3 && !fail;
+
+ std::cout << (fail ? "FAILED " : "passed ");
+ std::cout << '\"' << key[i] << '\"';
+ for (int j=0; j<(signed int)(30-strlen(key[i])); j++)
+ std::cout << ' ';
+ output.Put(outplain, 8);
+ std::cout << " ";
+ output.Put(out, 8);
+ std::cout << std::endl;
+ }
+ return pass1 && pass2 && pass3;
+}
- m.SetMark(16); sm.SetMark(16); rm.SetMark(16);
- }
+bool ValidateThreeWay()
+{
+ std::cout << "\n3-WAY validation suite running...\n\n";
+ bool pass1 = true, pass2 = true;
+
+ ThreeWayEncryption enc; // 96-bit only
+ pass1 = ThreeWayEncryption::KEYLENGTH == 12 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(8) == 12 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(12) == 12 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 12 && pass1;
+
+ ThreeWayDecryption dec; // 96-bit only
+ pass2 = ThreeWayDecryption::KEYLENGTH == 12 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(8) == 12 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(12) == 12 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 12 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/3wayval.dat", true, new HexDecoder);
+ return BlockTransformationTest(FixedRoundsCipherFactory<ThreeWayEncryption, ThreeWayDecryption>(), valdata) && pass1 && pass2;
+}
- return pass;
+bool ValidateGOST()
+{
+ std::cout << "\nGOST validation suite running...\n\n";
+ bool pass1 = true, pass2 = true;
+
+ GOSTEncryption enc; // 256-bit only
+ pass1 = GOSTEncryption::KEYLENGTH == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(40) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+
+ GOSTDecryption dec; // 256-bit only
+ pass2 = GOSTDecryption::KEYLENGTH == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(40) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/gostval.dat", true, new HexDecoder);
+ return BlockTransformationTest(FixedRoundsCipherFactory<GOSTEncryption, GOSTDecryption>(), valdata) && pass1 && pass2;
}
-#endif // CRYPTOPP_DISABLE_NACL
+bool ValidateSHARK()
+{
+ std::cout << "\nSHARK validation suite running...\n\n";
+ bool pass1 = true, pass2 = true;
+
+ SHARKEncryption enc; // 128-bit only
+ pass1 = SHARKEncryption::KEYLENGTH == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(15) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(17) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 16 && pass1;
+
+ SHARKDecryption dec; // 128-bit only
+ pass2 = SHARKDecryption::KEYLENGTH == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(15) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(17) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 16 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/sharkval.dat", true, new HexDecoder);
+ return BlockTransformationTest(FixedRoundsCipherFactory<SHARKEncryption, SHARKDecryption>(), valdata) && pass1 && pass2;
+}
-// NaCl requires an integrated random number generator; see randombytes()
-// in tweetnacl.cpp. We use DefaultAutoSeededRNG but it means we need
-// Operating System features to seed the generator. If you use another
-// generator, like RDRAND, then undefine CRYPTOPP_DISABLE_NACL in naclite.h.
-bool ValidateNaCl()
+bool ValidateCAST()
{
- std::cout << "\nTesting NaCl library functions...\n\n";
- bool pass = true, fail = false;
+ std::cout << "\nCAST-128 validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ CAST128Encryption enc1; // 40 to 128-bits (5 to 16-bytes)
+ pass1 = CAST128Encryption::DEFAULT_KEYLENGTH == 16 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(4) == 5 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(5) == 5 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(15) == 15 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc1.StaticGetValidKeyLength(17) == 16 && pass1;
+
+ CAST128Decryption dec1; // 40 to 128-bits (5 to 16-bytes)
+ pass2 = CAST128Decryption::DEFAULT_KEYLENGTH == 16 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(4) == 5 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(5) == 5 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(15) == 15 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec1.StaticGetValidKeyLength(17) == 16 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource val128(CRYPTOPP_DATA_DIR "TestData/cast128v.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<CAST128Encryption, CAST128Decryption>(16), val128, 1) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<CAST128Encryption, CAST128Decryption>(10), val128, 1) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<CAST128Encryption, CAST128Decryption>(5), val128, 1) && pass3;
+
+ std::cout << "\nCAST-256 validation suite running...\n\n";
+ bool pass4 = true, pass5 = true, pass6 = true;
+
+ CAST256Encryption enc2; // 128, 160, 192, 224, or 256-bits (16 to 32-bytes, step 4)
+ pass1 = CAST128Encryption::DEFAULT_KEYLENGTH == 16 && pass1;
+ pass4 = enc2.StaticGetValidKeyLength(15) == 16 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(16) == 16 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(17) == 20 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(20) == 20 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(24) == 24 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(28) == 28 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(31) == 32 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(32) == 32 && pass4;
+ pass4 = enc2.StaticGetValidKeyLength(33) == 32 && pass4;
+
+ CAST256Decryption dec2; // 128, 160, 192, 224, or 256-bits (16 to 32-bytes, step 4)
+ pass2 = CAST256Decryption::DEFAULT_KEYLENGTH == 16 && pass2;
+ pass5 = dec2.StaticGetValidKeyLength(15) == 16 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(16) == 16 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(17) == 20 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(20) == 20 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(24) == 24 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(28) == 28 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(31) == 32 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(32) == 32 && pass5;
+ pass5 = dec2.StaticGetValidKeyLength(33) == 32 && pass5;
+ std::cout << (pass4 && pass5 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource val256(CRYPTOPP_DATA_DIR "TestData/cast256v.dat", true, new HexDecoder);
+ pass6 = BlockTransformationTest(FixedRoundsCipherFactory<CAST256Encryption, CAST256Decryption>(16), val256, 1) && pass6;
+ pass6 = BlockTransformationTest(FixedRoundsCipherFactory<CAST256Encryption, CAST256Decryption>(24), val256, 1) && pass6;
+ pass6 = BlockTransformationTest(FixedRoundsCipherFactory<CAST256Encryption, CAST256Decryption>(32), val256, 1) && pass6;
+
+ return pass1 && pass2 && pass3 && pass4 && pass5 && pass6;
+}
-#ifdef CRYPTOPP_DISABLE_NACL
+bool ValidateSquare()
+{
+ std::cout << "\nSquare validation suite running...\n\n";
+ bool pass1 = true, pass2 = true;
+
+ SquareEncryption enc; // 128-bits only
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(15) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(17) == 16 && pass1;
+
+ SquareDecryption dec; // 128-bits only
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(15) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(17) == 16 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/squareva.dat", true, new HexDecoder);
+ return BlockTransformationTest(FixedRoundsCipherFactory<SquareEncryption, SquareDecryption>(), valdata) && pass1 && pass2;
+}
- std::cout << "NaCl not available, skipping test." << std::endl;
+bool ValidateSKIPJACK()
+{
+ std::cout << "\nSKIPJACK validation suite running...\n\n";
+ bool pass1 = true, pass2 = true;
+
+ SKIPJACKEncryption enc; // 80-bits only
+ pass1 = enc.StaticGetValidKeyLength(8) == 10 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(9) == 10 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(10) == 10 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 10 && pass1;
+
+ SKIPJACKDecryption dec; // 80-bits only
+ pass2 = dec.StaticGetValidKeyLength(8) == 10 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(9) == 10 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(10) == 10 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 10 && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/skipjack.dat", true, new HexDecoder);
+ return BlockTransformationTest(FixedRoundsCipherFactory<SKIPJACKEncryption, SKIPJACKDecryption>(), valdata) && pass1 && pass2;
+}
-#else
+bool ValidateSEAL()
+{
+ const byte input[] = {0x37,0xa0,0x05,0x95,0x9b,0x84,0xc4,0x9c,0xa4,0xbe,0x1e,0x05,0x06,0x73,0x53,0x0f,0x5f,0xb0,0x97,0xfd,0xf6,0xa1,0x3f,0xbd,0x6c,0x2c,0xde,0xcd,0x81,0xfd,0xee,0x7c};
+ const byte key[] = {0x67, 0x45, 0x23, 0x01, 0xef, 0xcd, 0xab, 0x89, 0x98, 0xba, 0xdc, 0xfe, 0x10, 0x32, 0x54, 0x76, 0xc3, 0xd2, 0xe1, 0xf0};
+ const byte iv[] = {0x01, 0x35, 0x77, 0xaf};
+ byte output[32];
+
+ std::cout << "\nSEAL validation suite running...\n\n";
+
+ SEAL<>::Encryption seal(key, sizeof(key), iv);
+ unsigned int size = sizeof(input);
+ bool pass = true;
+
+ memset(output, 1, size);
+ seal.ProcessString(output, input, size);
+ for (unsigned int i=0; i<size; i++)
+ if (output[i] != 0)
+ pass = false;
+
+ seal.Seek(1);
+ output[1] = seal.ProcessByte(output[1]);
+ seal.ProcessString(output+2, size-2);
+ pass = pass && memcmp(output+1, input+1, size-1) == 0;
+
+ std::cout << (pass ? "passed" : "FAILED") << std::endl;
+ return pass;
+}
- fail = !TestCryptoBox();
- std::cout << (fail ? "FAILED" : "passed") << " crypto_box, crypto_box_beforenm, crypto_box_afternm\n";
- pass = !fail && pass;
+bool ValidateBaseCode()
+{
+ bool pass = true, fail;
+ byte data[255];
+ for (unsigned int i=0; i<255; i++)
+ data[i] = byte(i);
+
+ const char hexEncoded[] =
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627"
+ "28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F"
+ "505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F7071727374757677"
+ "78797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F"
+ "A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7"
+ "C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF"
+ "F0F1F2F3F4F5F6F7F8F9FAFBFCFDFE";
+ const char base32Encoded[] =
+ "AAASEA2EAWDAQCAJBIFS2DIQB6IBCESVCSKTNF22DEPBYHA7D2RUAIJCENUCKJTHFAWUWK3NFWZC8NBT"
+ "GI3VIPJYG66DUQT5HS8V6R4AIFBEGTCFI3DWSUKKJPGE4VURKBIXEW4WKXMFQYC3MJPX2ZK8M7SGC2VD"
+ "NTUYN35IPFXGY5DPP3ZZA6MUQP4HK7VZRB6ZW856RX9H9AEBSKB2JBNGS8EIVCWMTUG27D6SUGJJHFEX"
+ "U4M3TGN4VQQJ5HW9WCS4FI7EWYVKRKFJXKX43MPQX82MDNXVYU45PP72ZG7MZRF7Z496BSQC2RCNMTYH"
+ "3DE6XU8N3ZHN9WGT4MJ7JXQY49NPVYY55VQ77Z9A6HTQH3HF65V8T4RK7RYQ55ZR8D29F69W8Z5RR8H3"
+ "9M7939R8";
+ const char base64AndHexEncoded[] =
+ "41414543417751464267634943516F4C4441304F4478415245684D554652595847426B6147787764"
+ "486838674953496A4A43556D4A7967704B6973734C5334764D4445794D7A51310A4E6A63344F546F"
+ "375044302B50304242516B4E4552555A4853456C4B5330784E546B395155564A5456465657563168"
+ "5A576C746358563566594746695932526C5A6D646F615770720A6247317562334278636E4E306458"
+ "5A3365486C3665337839666E2B4167594B44684957476834694A696F754D6A5936506B4A47536B35"
+ "53566C7065596D5A71626E4A32656E3643680A6F714F6B7061616E714B6D717136797472712B7773"
+ "624B7A744C573274376935757275387662362F774D484377385446787366497963724C7A4D334F7A"
+ "39445230745055316462580A324E6E6132397A6433742F6734654C6A354F586D352B6A7036757673"
+ "3765377638504879382F5431397666342B6672372F50332B0A";
+ const char base64URLAndHexEncoded[] =
+ "41414543417751464267634943516F4C4441304F4478415245684D554652595847426B6147787764"
+ "486838674953496A4A43556D4A7967704B6973734C5334764D4445794D7A51314E6A63344F546F37"
+ "5044302D50304242516B4E4552555A4853456C4B5330784E546B395155564A54564656575631685A"
+ "576C746358563566594746695932526C5A6D646F615770726247317562334278636E4E3064585A33"
+ "65486C3665337839666E2D4167594B44684957476834694A696F754D6A5936506B4A47536B355356"
+ "6C7065596D5A71626E4A32656E3643686F714F6B7061616E714B6D717136797472712D7773624B7A"
+ "744C573274376935757275387662365F774D484377385446787366497963724C7A4D334F7A394452"
+ "3074505531646258324E6E6132397A6433745F6734654C6A354F586D352D6A703675767337653776"
+ "38504879385F5431397666342D6672375F50332D";
+
+ std::cout << "\nBase64, Base64URL, Base32 and Base16 coding validation suite running...\n\n";
+
+ fail = !TestFilter(HexEncoder().Ref(), data, 255, (const byte *)hexEncoded, strlen(hexEncoded));
+ try {HexEncoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Hex Encoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(HexDecoder().Ref(), (const byte *)hexEncoded, strlen(hexEncoded), data, 255);
+ try {HexDecoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Hex Decoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(Base32Encoder().Ref(), data, 255, (const byte *)base32Encoded, strlen(base32Encoded));
+ try {Base32Encoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Base32 Encoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(Base32Decoder().Ref(), (const byte *)base32Encoded, strlen(base32Encoded), data, 255);
+ try {Base32Decoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Base32 Decoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(Base64Encoder(new HexEncoder).Ref(), data, 255, (const byte *)base64AndHexEncoded, strlen(base64AndHexEncoded));
+ try {Base64Encoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Base64 Encoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(HexDecoder(new Base64Decoder).Ref(), (const byte *)base64AndHexEncoded, strlen(base64AndHexEncoded), data, 255);
+ try {Base64Decoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Base64 Decoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(Base64URLEncoder(new HexEncoder).Ref(), data, 255, (const byte *)base64URLAndHexEncoded, strlen(base64URLAndHexEncoded));
+ try {Base64URLEncoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Base64 URL Encoding\n";
+ pass = pass && !fail;
+
+ fail = !TestFilter(HexDecoder(new Base64URLDecoder).Ref(), (const byte *)base64URLAndHexEncoded, strlen(base64URLAndHexEncoded), data, 255);
+ try {Base64URLDecoder().IsolatedInitialize(g_nullNameValuePairs);}
+ catch (const Exception&) {fail=true;}
+ std::cout << (fail ? "FAILED:" : "passed:");
+ std::cout << " Base64 URL Decoding\n";
+ pass = pass && !fail;
+
+ return pass;
+}
- fail = !TestCryptoBoxOpen();
- std::cout << (fail ? "FAILED" : "passed") << " crypto_box_open, crypto_box_open_afternm\n";
- pass = !fail && pass;
+class MyEncoder : public SimpleProxyFilter
+{
+public:
+ MyEncoder(BufferedTransformation *attachment = NULLPTR);
+ void IsolatedInitialize(const NameValuePairs &params);
+};
- fail = !TestCryptoBoxKeys();
- std::cout << (fail ? "FAILED" : "passed") << " crypto_box_keypair pairwise consistency\n";
- pass = !fail && pass;
+MyEncoder::MyEncoder(BufferedTransformation *attachment)
+ : SimpleProxyFilter(new BaseN_Encoder(new Grouper), attachment)
+{
+ IsolatedInitialize(MakeParameters(Name::InsertLineBreaks(), true)(Name::MaxLineLength(), 72));
+}
- fail = !TestCryptoSign();
- std::cout << (fail ? "FAILED" : "passed") << " crypto_sign, crypto_sign_open, crypto_sign_keypair\n";
- pass = !fail && pass;
+void MyEncoder::IsolatedInitialize(const NameValuePairs &parameters)
+{
+ bool insertLineBreaks = parameters.GetValueWithDefault(Name::InsertLineBreaks(), true);
+ int maxLineLength = parameters.GetIntValueWithDefault(Name::MaxLineLength(), 72);
+
+ const byte padding = '=';
+ const char *lineBreak = insertLineBreaks ? "\n" : "";
+
+ char stars[64];
+ memset(stars, '*', 64);
+
+ m_filter->Initialize(CombinedNameValuePairs(
+ parameters,
+ MakeParameters(Name::EncodingLookupArray(), (const byte *)&stars[0], false)
+ (Name::PaddingByte(), padding)
+ (Name::GroupSize(), insertLineBreaks ? maxLineLength : 0)
+ (Name::Separator(), ConstByteArrayParameter(lineBreak))
+ (Name::Terminator(), ConstByteArrayParameter(lineBreak))
+ (Name::Log2Base(), 6, true)));
+}
- fail = !TestCryptoSignKeys();
- std::cout << (fail ? "FAILED" : "passed") << " crypto_sign_keypair pairwise consistency\n";
- pass = !fail && pass;
+class MyDecoder : public BaseN_Decoder
+{
+public:
+ MyDecoder(BufferedTransformation *attachment = NULLPTR);
+ void IsolatedInitialize(const NameValuePairs &params);
+ static const int * CRYPTOPP_API GetDecodingLookupArray();
+};
-#endif
+MyDecoder::MyDecoder(BufferedTransformation *attachment)
+ : BaseN_Decoder(GetDecodingLookupArray(), 6, attachment)
+{
+}
- return pass;
+void MyDecoder::IsolatedInitialize(const NameValuePairs &parameters)
+{
+ BaseN_Decoder::IsolatedInitialize(CombinedNameValuePairs(
+ parameters,
+ MakeParameters(Name::DecodingLookupArray(), GetDecodingLookupArray(), false)(Name::Log2Base(), 6, true)));
+}
+
+struct MyDecoderAlphabet
+{
+ MyDecoderAlphabet() {
+ std::fill(tab, tab+COUNTOF(tab), '*');
+ }
+ byte tab[64];
+};
+
+struct MyDecoderArray
+{
+ MyDecoderArray() {
+ std::fill(tab, tab+COUNTOF(tab), -1);
+ }
+ int tab[256];
+};
+
+const int * MyDecoder::GetDecodingLookupArray()
+{
+ static bool s_initialized = false;
+ static MyDecoderAlphabet s_alpha;
+ static MyDecoderArray s_array;
+
+ MEMORY_BARRIER();
+ if (!s_initialized)
+ {
+ InitializeDecodingLookupArray(s_array.tab, s_alpha.tab, COUNTOF(s_alpha.tab), false);
+ s_initialized = true;
+ MEMORY_BARRIER();
+ }
+ return s_array.tab;
+}
+
+bool ValidateEncoder()
+{
+ // The default encoder and decoder alphabet are bogus. They are a
+ // string of '*'. To round trip a string both IsolatedInitialize
+ // must be called and work correctly.
+ std::cout << "\nCustom encoder validation running...\n\n";
+ bool pass = true;
+
+ int lookup[256];
+ const char alphabet[64+1] =
+ "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz01234576789*";
+ const char expected[] =
+ "ILcBMSgriDicmKmTi2oENCsuJTufN0yWjL1HnS8xKdaiOkeZK3gKock1ktmlo1q4LlsNPrAyGrG0gjO2gzQ5FQ==";
+
+ MyEncoder encoder;
+ std::string str1;
+
+ AlgorithmParameters eparams = MakeParameters(Name::EncodingLookupArray(),(const byte*)alphabet)
+ (Name::InsertLineBreaks(), false);
+ encoder.IsolatedInitialize(eparams);
+
+ encoder.Detach(new StringSink(str1));
+ encoder.Put((const byte*) alphabet, 64);
+ encoder.MessageEnd();
+
+ MyDecoder decoder;
+ std::string str2;
+
+ MyDecoder::InitializeDecodingLookupArray(lookup, (const byte*) alphabet, 64, false);
+ AlgorithmParameters dparams = MakeParameters(Name::DecodingLookupArray(),(const int*)lookup);
+ decoder.IsolatedInitialize(dparams);
+
+ decoder.Detach(new StringSink(str2));
+ decoder.Put((const byte*) str1.data(), str1.size());
+ decoder.MessageEnd();
+
+ pass = (str1 == std::string(expected)) && pass;
+ pass = (str2 == std::string(alphabet, 64)) && pass;
+
+ std::cout << (pass ? "passed:" : "FAILED:");
+ std::cout << " Encode and decode\n";
+
+ // Try forcing an empty message. This is the Monero bug
+ // at https://github.com/weidai11/cryptopp/issues/562.
+ {
+ MyDecoder decoder2;
+ SecByteBlock empty;
+
+ AlgorithmParameters dparams2 = MakeParameters(Name::DecodingLookupArray(),(const int*)lookup);
+ decoder2.IsolatedInitialize(dparams2);
+
+ decoder2.Detach(new Redirector(TheBitBucket()));
+ decoder2.Put(empty.BytePtr(), empty.SizeInBytes());
+ decoder2.MessageEnd();
+
+ // Tame the optimizer
+ volatile lword size = decoder2.MaxRetrievable();
+ lword shadow = size;
+ CRYPTOPP_UNUSED(shadow);
+ }
+
+ std::cout << "passed: 0-length message\n";
+
+ return pass;
+}
+
+bool ValidateSHACAL2()
+{
+ std::cout << "\nSHACAL-2 validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ SHACAL2Encryption enc; // 128 to 512-bits (16 to 64-bytes)
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(15) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 64 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(65) == 64 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 64 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ SHACAL2Decryption dec; // 128 to 512-bits (16 to 64-bytes)
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(15) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 64 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(65) == 64 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 64 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/shacal2v.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SHACAL2Encryption, SHACAL2Decryption>(16), valdata, 4) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<SHACAL2Encryption, SHACAL2Decryption>(64), valdata, 10) && pass3;
+ return pass1 && pass2 && pass3;
+}
+
+bool ValidateARIA()
+{
+ std::cout << "\nARIA validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ ARIAEncryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ ARIADecryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/aria.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<ARIAEncryption, ARIADecryption>(16), valdata, 15) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<ARIAEncryption, ARIADecryption>(24), valdata, 15) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<ARIAEncryption, ARIADecryption>(32), valdata, 15) && pass3;
+ return pass1 && pass2 && pass3;
+}
+
+bool ValidateSIMECK()
+{
+ std::cout << "\nSIMECK validation suite running...\n";
+
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/simeck.txt");
+}
+
+bool ValidateCHAM()
+{
+ std::cout << "\nCHAM validation suite running...\n";
+
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/cham.txt");
+}
+
+bool ValidateHIGHT()
+{
+ std::cout << "\nHIGHT validation suite running...\n";
+
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/hight.txt");
+}
+
+bool ValidateLEA()
+{
+ std::cout << "\nLEA validation suite running...\n";
+
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/lea.txt");
+}
+
+bool ValidateCamellia()
+{
+ std::cout << "\nCamellia validation suite running...\n\n";
+ bool pass1 = true, pass2 = true, pass3 = true;
+
+ CamelliaEncryption enc;
+ pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(24) == 24 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(32) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(64) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(128) == 32 && pass1;
+ pass1 = enc.StaticGetValidKeyLength(0) == enc.MinKeyLength() && pass1;
+ pass1 = enc.StaticGetValidKeyLength(SIZE_MAX) == enc.MaxKeyLength() && pass1;
+
+ CamelliaDecryption dec;
+ pass2 = dec.StaticGetValidKeyLength(8) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(16) == 16 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(24) == 24 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(32) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(64) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(128) == 32 && pass2;
+ pass2 = dec.StaticGetValidKeyLength(0) == dec.MinKeyLength() && pass2;
+ pass2 = dec.StaticGetValidKeyLength(SIZE_MAX) == dec.MaxKeyLength() && pass2;
+ std::cout << (pass1 && pass2 ? "passed:" : "FAILED:") << " Algorithm key lengths\n";
+
+ FileSource valdata(CRYPTOPP_DATA_DIR "TestData/camellia.dat", true, new HexDecoder);
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<CamelliaEncryption, CamelliaDecryption>(16), valdata, 15) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<CamelliaEncryption, CamelliaDecryption>(24), valdata, 15) && pass3;
+ pass3 = BlockTransformationTest(FixedRoundsCipherFactory<CamelliaEncryption, CamelliaDecryption>(32), valdata, 15) && pass3;
+ return pass1 && pass2 && pass3;
+}
+
+bool ValidateSalsa()
+{
+ std::cout << "\nSalsa validation suite running...\n";
+
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/salsa.txt");
+}
+
+bool ValidateSosemanuk()
+{
+ std::cout << "\nSosemanuk validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/sosemanuk.txt");
+}
+
+bool ValidateRabbit()
+{
+ std::cout << "\nRabbit validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/rabbit.txt");
+}
+
+bool ValidateHC128()
+{
+ std::cout << "\nHC-128 validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/hc128.txt");
+}
+
+bool ValidateHC256()
+{
+ std::cout << "\nHC-256 validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/hc256.txt");
+}
+
+bool ValidateVMAC()
+{
+ std::cout << "\nVMAC validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/vmac.txt");
+}
+
+bool ValidateCCM()
+{
+ std::cout << "\nAES/CCM validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/ccm.txt");
+}
+
+bool ValidateGCM()
+{
+ std::cout << "\nAES/GCM validation suite running...\n";
+ std::cout << "\n2K tables:";
+ bool pass = RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/gcm.txt", MakeParameters(Name::TableSize(), (int)2048));
+ std::cout << "\n64K tables:";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/gcm.txt", MakeParameters(Name::TableSize(), (int)64*1024)) && pass;
+}
+
+bool ValidateCMAC()
+{
+ std::cout << "\nCMAC validation suite running...\n";
+ return RunTestDataFile(CRYPTOPP_DATA_DIR "TestVectors/cmac.txt");
}
-NAMESPACE_END
-NAMESPACE_END
+NAMESPACE_END // Test
+NAMESPACE_END // CryptoPP