diff options
Diffstat (limited to '')
51 files changed, 1 insertions, 14433 deletions
diff --git a/CryptoPP/3way.cpp b/CryptoPP/3way.cpp deleted file mode 100644 index 725b682ea..000000000 --- a/CryptoPP/3way.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c -// The original code and all modifications are in the public domain. - -#include "pch.h" -#include "3way.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -void ThreeWay_TestInstantiations() -{ - ThreeWay::Encryption x1; - ThreeWay::Decryption x2; -} - -static const word32 START_E = 0x0b0b; // round constant of first encryption round -static const word32 START_D = 0xb1b1; // round constant of first decryption round -static const word32 RC_MODULUS = 0x11011; - -static inline word32 reverseBits(word32 a) -{ - a = ((a & 0xAAAAAAAA) >> 1) | ((a & 0x55555555) << 1); - a = ((a & 0xCCCCCCCC) >> 2) | ((a & 0x33333333) << 2); - return ((a & 0xF0F0F0F0) >> 4) | ((a & 0x0F0F0F0F) << 4); -} - -#define mu(a0, a1, a2) \ -{ \ - a1 = reverseBits(a1); \ - word32 t = reverseBits(a0); \ - a0 = reverseBits(a2); \ - a2 = t; \ -} - -#define pi_gamma_pi(a0, a1, a2) \ -{ \ - word32 b0, b2; \ - b2 = rotlFixed(a2, 1U); \ - b0 = rotlFixed(a0, 22U); \ - a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \ - a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\ - a1 ^= (b2|(~b0)); \ -} - -// thanks to Paulo Barreto for this optimized theta() -#define theta(a0, a1, a2) \ -{ \ - word32 b0, b1, c; \ - c = a0 ^ a1 ^ a2; \ - c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \ - b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \ - b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \ - a0 ^= c ^ b0; \ - a1 ^= c ^ b1; \ - a2 ^= c ^ (b0 >> 16) ^ (b1 << 16); \ -} - -#define rho(a0, a1, a2) \ -{ \ - theta(a0, a1, a2); \ - pi_gamma_pi(a0, a1, a2); \ -} - -void ThreeWay::Base::UncheckedSetKey(const byte *uk, unsigned int length, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(length); - - m_rounds = GetRoundsAndThrowIfInvalid(params, this); - - for (unsigned int i=0; i<3; i++) - m_k[i] = (word32)uk[4*i+3] | ((word32)uk[4*i+2]<<8) | ((word32)uk[4*i+1]<<16) | ((word32)uk[4*i]<<24); - - if (!IsForwardTransformation()) - { - theta(m_k[0], m_k[1], m_k[2]); - mu(m_k[0], m_k[1], m_k[2]); - m_k[0] = ByteReverse(m_k[0]); - m_k[1] = ByteReverse(m_k[1]); - m_k[2] = ByteReverse(m_k[2]); - } -} - -void ThreeWay::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - typedef BlockGetAndPut<word32, BigEndian> Block; - - word32 a0, a1, a2; - Block::Get(inBlock)(a0)(a1)(a2); - - word32 rc = START_E; - - for(unsigned i=0; i<m_rounds; i++) - { - a0 ^= m_k[0] ^ (rc<<16); - a1 ^= m_k[1]; - a2 ^= m_k[2] ^ rc; - rho(a0, a1, a2); - - rc <<= 1; - if (rc&0x10000) rc ^= 0x11011; - } - a0 ^= m_k[0] ^ (rc<<16); - a1 ^= m_k[1]; - a2 ^= m_k[2] ^ rc; - theta(a0, a1, a2); - - Block::Put(xorBlock, outBlock)(a0)(a1)(a2); -} - -void ThreeWay::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - typedef BlockGetAndPut<word32, LittleEndian> Block; - - word32 a0, a1, a2; - Block::Get(inBlock)(a0)(a1)(a2); - - word32 rc = START_D; - - mu(a0, a1, a2); - for(unsigned i=0; i<m_rounds; i++) - { - a0 ^= m_k[0] ^ (rc<<16); - a1 ^= m_k[1]; - a2 ^= m_k[2] ^ rc; - rho(a0, a1, a2); - - rc <<= 1; - if (rc&0x10000) rc ^= 0x11011; - } - a0 ^= m_k[0] ^ (rc<<16); - a1 ^= m_k[1]; - a2 ^= m_k[2] ^ rc; - theta(a0, a1, a2); - mu(a0, a1, a2); - - Block::Put(xorBlock, outBlock)(a0)(a1)(a2); -} - -NAMESPACE_END diff --git a/CryptoPP/3way.h b/CryptoPP/3way.h deleted file mode 100644 index 33a619e2f..000000000 --- a/CryptoPP/3way.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef CRYPTOPP_THREEWAY_H -#define CRYPTOPP_THREEWAY_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct ThreeWay_Info : public FixedBlockSize<12>, public FixedKeyLength<12>, public VariableRounds<11> -{ - static const char *StaticAlgorithmName() {return "3-Way";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#3-Way">3-Way</a> -class ThreeWay : public ThreeWay_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<ThreeWay_Info> - { - public: - void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms); - - protected: - unsigned int m_rounds; - FixedSizeSecBlock<word32, 3> m_k; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef ThreeWay::Encryption ThreeWayEncryption; -typedef ThreeWay::Decryption ThreeWayDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/arc4.cpp b/CryptoPP/arc4.cpp deleted file mode 100644 index b5c27309e..000000000 --- a/CryptoPP/arc4.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// arc4.cpp - written and placed in the public domain by Wei Dai - -// The ARC4 algorithm was first revealed in an anonymous email to the -// cypherpunks mailing list. This file originally contained some -// code copied from this email. The code has since been rewritten in order -// to clarify the copyright status of this file. It should now be -// completely in the public domain. - -#include "pch.h" -#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 -#include "arc4.h" - -NAMESPACE_BEGIN(CryptoPP) -namespace Weak1 { - -void ARC4_TestInstantiations() -{ - ARC4 x; -} - -ARC4_Base::~ARC4_Base() -{ - m_x = m_y = 0; -} - -void ARC4_Base::UncheckedSetKey(const byte *key, unsigned int keyLen, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(keyLen); - - m_x = 1; - m_y = 0; - - unsigned int i; - for (i=0; i<256; i++) - m_state[i] = i; - - unsigned int keyIndex = 0, stateIndex = 0; - for (i=0; i<256; i++) - { - unsigned int a = m_state[i]; - stateIndex += key[keyIndex] + a; - stateIndex &= 0xff; - m_state[i] = m_state[stateIndex]; - m_state[stateIndex] = a; - if (++keyIndex >= keyLen) - keyIndex = 0; - } - - int discardBytes = params.GetIntValueWithDefault("DiscardBytes", GetDefaultDiscardBytes()); - DiscardBytes(discardBytes); -} - -template <class T> -static inline unsigned int MakeByte(T &x, T &y, byte *s) -{ - unsigned int a = s[x]; - y = (y+a) & 0xff; - unsigned int b = s[y]; - s[x] = b; - s[y] = a; - x = (x+1) & 0xff; - return s[(a+b) & 0xff]; -} - -void ARC4_Base::GenerateBlock(byte *output, size_t size) -{ - while (size--) - *output++ = MakeByte(m_x, m_y, m_state); -} - -void ARC4_Base::ProcessData(byte *outString, const byte *inString, size_t length) -{ - if (length == 0) - return; - - byte *const s = m_state; - unsigned int x = m_x; - unsigned int y = m_y; - - if (inString == outString) - { - do - { - *outString++ ^= MakeByte(x, y, s); - } while (--length); - } - else - { - do - { - *outString++ = *inString++ ^ MakeByte(x, y, s); - } - while(--length); - } - - m_x = x; - m_y = y; -} - -void ARC4_Base::DiscardBytes(size_t length) -{ - if (length == 0) - return; - - byte *const s = m_state; - unsigned int x = m_x; - unsigned int y = m_y; - - do - { - MakeByte(x, y, s); - } - while(--length); - - m_x = x; - m_y = y; -} - -} -NAMESPACE_END diff --git a/CryptoPP/arc4.h b/CryptoPP/arc4.h deleted file mode 100644 index 9dcc92efd..000000000 --- a/CryptoPP/arc4.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef CRYPTOPP_ARC4_H -#define CRYPTOPP_ARC4_H - -#include "strciphr.h" - -NAMESPACE_BEGIN(CryptoPP) - -namespace Weak1 { - -//! _ -class CRYPTOPP_NO_VTABLE ARC4_Base : public VariableKeyLength<16, 1, 256>, public RandomNumberGenerator, public SymmetricCipher, public SymmetricCipherDocumentation -{ -public: - ~ARC4_Base(); - - static const char *StaticAlgorithmName() {return "ARC4";} - - void GenerateBlock(byte *output, size_t size); - void DiscardBytes(size_t n); - - void ProcessData(byte *outString, const byte *inString, size_t length); - - bool IsRandomAccess() const {return false;} - bool IsSelfInverting() const {return true;} - bool IsForwardTransformation() const {return true;} - - typedef SymmetricCipherFinal<ARC4_Base> Encryption; - typedef SymmetricCipherFinal<ARC4_Base> Decryption; - -protected: - void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms); - virtual unsigned int GetDefaultDiscardBytes() const {return 0;} - - FixedSizeSecBlock<byte, 256> m_state; - byte m_x, m_y; -}; - -//! <a href="http://www.weidai.com/scan-mirror/cs.html#RC4">Alleged RC4</a> -DOCUMENTED_TYPEDEF(SymmetricCipherFinal<ARC4_Base>, ARC4) - -//! _ -class CRYPTOPP_NO_VTABLE MARC4_Base : public ARC4_Base -{ -public: - static const char *StaticAlgorithmName() {return "MARC4";} - - typedef SymmetricCipherFinal<MARC4_Base> Encryption; - typedef SymmetricCipherFinal<MARC4_Base> Decryption; - -protected: - unsigned int GetDefaultDiscardBytes() const {return 256;} -}; - -//! Modified ARC4: it discards the first 256 bytes of keystream which may be weaker than the rest -DOCUMENTED_TYPEDEF(SymmetricCipherFinal<MARC4_Base>, MARC4) - -} -#if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1 -namespace Weak {using namespace Weak1;} // import Weak1 into CryptoPP::Weak -#else -using namespace Weak1; // import Weak1 into CryptoPP with warning -#ifdef __GNUC__ -#warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning." -#else -#pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning.") -#endif -#endif - -NAMESPACE_END - -#endif diff --git a/CryptoPP/bfinit.cpp b/CryptoPP/bfinit.cpp deleted file mode 100644 index 714570aaa..000000000 --- a/CryptoPP/bfinit.cpp +++ /dev/null @@ -1,277 +0,0 @@ -#include "pch.h" -#include "blowfish.h" - -NAMESPACE_BEGIN(CryptoPP) - -const word32 Blowfish::Base::p_init[Blowfish::ROUNDS+2] = -{ - 608135816U, 2242054355U, 320440878U, 57701188U, - 2752067618U, 698298832U, 137296536U, 3964562569U, - 1160258022U, 953160567U, 3193202383U, 887688300U, - 3232508343U, 3380367581U, 1065670069U, 3041331479U, - 2450970073U, 2306472731U -} ; - -const word32 Blowfish::Base::s_init[4*256] = { - 3509652390U, 2564797868U, 805139163U, 3491422135U, - 3101798381U, 1780907670U, 3128725573U, 4046225305U, - 614570311U, 3012652279U, 134345442U, 2240740374U, - 1667834072U, 1901547113U, 2757295779U, 4103290238U, - 227898511U, 1921955416U, 1904987480U, 2182433518U, - 2069144605U, 3260701109U, 2620446009U, 720527379U, - 3318853667U, 677414384U, 3393288472U, 3101374703U, - 2390351024U, 1614419982U, 1822297739U, 2954791486U, - 3608508353U, 3174124327U, 2024746970U, 1432378464U, - 3864339955U, 2857741204U, 1464375394U, 1676153920U, - 1439316330U, 715854006U, 3033291828U, 289532110U, - 2706671279U, 2087905683U, 3018724369U, 1668267050U, - 732546397U, 1947742710U, 3462151702U, 2609353502U, - 2950085171U, 1814351708U, 2050118529U, 680887927U, - 999245976U, 1800124847U, 3300911131U, 1713906067U, - 1641548236U, 4213287313U, 1216130144U, 1575780402U, - 4018429277U, 3917837745U, 3693486850U, 3949271944U, - 596196993U, 3549867205U, 258830323U, 2213823033U, - 772490370U, 2760122372U, 1774776394U, 2652871518U, - 566650946U, 4142492826U, 1728879713U, 2882767088U, - 1783734482U, 3629395816U, 2517608232U, 2874225571U, - 1861159788U, 326777828U, 3124490320U, 2130389656U, - 2716951837U, 967770486U, 1724537150U, 2185432712U, - 2364442137U, 1164943284U, 2105845187U, 998989502U, - 3765401048U, 2244026483U, 1075463327U, 1455516326U, - 1322494562U, 910128902U, 469688178U, 1117454909U, - 936433444U, 3490320968U, 3675253459U, 1240580251U, - 122909385U, 2157517691U, 634681816U, 4142456567U, - 3825094682U, 3061402683U, 2540495037U, 79693498U, - 3249098678U, 1084186820U, 1583128258U, 426386531U, - 1761308591U, 1047286709U, 322548459U, 995290223U, - 1845252383U, 2603652396U, 3431023940U, 2942221577U, - 3202600964U, 3727903485U, 1712269319U, 422464435U, - 3234572375U, 1170764815U, 3523960633U, 3117677531U, - 1434042557U, 442511882U, 3600875718U, 1076654713U, - 1738483198U, 4213154764U, 2393238008U, 3677496056U, - 1014306527U, 4251020053U, 793779912U, 2902807211U, - 842905082U, 4246964064U, 1395751752U, 1040244610U, - 2656851899U, 3396308128U, 445077038U, 3742853595U, - 3577915638U, 679411651U, 2892444358U, 2354009459U, - 1767581616U, 3150600392U, 3791627101U, 3102740896U, - 284835224U, 4246832056U, 1258075500U, 768725851U, - 2589189241U, 3069724005U, 3532540348U, 1274779536U, - 3789419226U, 2764799539U, 1660621633U, 3471099624U, - 4011903706U, 913787905U, 3497959166U, 737222580U, - 2514213453U, 2928710040U, 3937242737U, 1804850592U, - 3499020752U, 2949064160U, 2386320175U, 2390070455U, - 2415321851U, 4061277028U, 2290661394U, 2416832540U, - 1336762016U, 1754252060U, 3520065937U, 3014181293U, - 791618072U, 3188594551U, 3933548030U, 2332172193U, - 3852520463U, 3043980520U, 413987798U, 3465142937U, - 3030929376U, 4245938359U, 2093235073U, 3534596313U, - 375366246U, 2157278981U, 2479649556U, 555357303U, - 3870105701U, 2008414854U, 3344188149U, 4221384143U, - 3956125452U, 2067696032U, 3594591187U, 2921233993U, - 2428461U, 544322398U, 577241275U, 1471733935U, - 610547355U, 4027169054U, 1432588573U, 1507829418U, - 2025931657U, 3646575487U, 545086370U, 48609733U, - 2200306550U, 1653985193U, 298326376U, 1316178497U, - 3007786442U, 2064951626U, 458293330U, 2589141269U, - 3591329599U, 3164325604U, 727753846U, 2179363840U, - 146436021U, 1461446943U, 4069977195U, 705550613U, - 3059967265U, 3887724982U, 4281599278U, 3313849956U, - 1404054877U, 2845806497U, 146425753U, 1854211946U, - - 1266315497U, 3048417604U, 3681880366U, 3289982499U, - 2909710000U, 1235738493U, 2632868024U, 2414719590U, - 3970600049U, 1771706367U, 1449415276U, 3266420449U, - 422970021U, 1963543593U, 2690192192U, 3826793022U, - 1062508698U, 1531092325U, 1804592342U, 2583117782U, - 2714934279U, 4024971509U, 1294809318U, 4028980673U, - 1289560198U, 2221992742U, 1669523910U, 35572830U, - 157838143U, 1052438473U, 1016535060U, 1802137761U, - 1753167236U, 1386275462U, 3080475397U, 2857371447U, - 1040679964U, 2145300060U, 2390574316U, 1461121720U, - 2956646967U, 4031777805U, 4028374788U, 33600511U, - 2920084762U, 1018524850U, 629373528U, 3691585981U, - 3515945977U, 2091462646U, 2486323059U, 586499841U, - 988145025U, 935516892U, 3367335476U, 2599673255U, - 2839830854U, 265290510U, 3972581182U, 2759138881U, - 3795373465U, 1005194799U, 847297441U, 406762289U, - 1314163512U, 1332590856U, 1866599683U, 4127851711U, - 750260880U, 613907577U, 1450815602U, 3165620655U, - 3734664991U, 3650291728U, 3012275730U, 3704569646U, - 1427272223U, 778793252U, 1343938022U, 2676280711U, - 2052605720U, 1946737175U, 3164576444U, 3914038668U, - 3967478842U, 3682934266U, 1661551462U, 3294938066U, - 4011595847U, 840292616U, 3712170807U, 616741398U, - 312560963U, 711312465U, 1351876610U, 322626781U, - 1910503582U, 271666773U, 2175563734U, 1594956187U, - 70604529U, 3617834859U, 1007753275U, 1495573769U, - 4069517037U, 2549218298U, 2663038764U, 504708206U, - 2263041392U, 3941167025U, 2249088522U, 1514023603U, - 1998579484U, 1312622330U, 694541497U, 2582060303U, - 2151582166U, 1382467621U, 776784248U, 2618340202U, - 3323268794U, 2497899128U, 2784771155U, 503983604U, - 4076293799U, 907881277U, 423175695U, 432175456U, - 1378068232U, 4145222326U, 3954048622U, 3938656102U, - 3820766613U, 2793130115U, 2977904593U, 26017576U, - 3274890735U, 3194772133U, 1700274565U, 1756076034U, - 4006520079U, 3677328699U, 720338349U, 1533947780U, - 354530856U, 688349552U, 3973924725U, 1637815568U, - 332179504U, 3949051286U, 53804574U, 2852348879U, - 3044236432U, 1282449977U, 3583942155U, 3416972820U, - 4006381244U, 1617046695U, 2628476075U, 3002303598U, - 1686838959U, 431878346U, 2686675385U, 1700445008U, - 1080580658U, 1009431731U, 832498133U, 3223435511U, - 2605976345U, 2271191193U, 2516031870U, 1648197032U, - 4164389018U, 2548247927U, 300782431U, 375919233U, - 238389289U, 3353747414U, 2531188641U, 2019080857U, - 1475708069U, 455242339U, 2609103871U, 448939670U, - 3451063019U, 1395535956U, 2413381860U, 1841049896U, - 1491858159U, 885456874U, 4264095073U, 4001119347U, - 1565136089U, 3898914787U, 1108368660U, 540939232U, - 1173283510U, 2745871338U, 3681308437U, 4207628240U, - 3343053890U, 4016749493U, 1699691293U, 1103962373U, - 3625875870U, 2256883143U, 3830138730U, 1031889488U, - 3479347698U, 1535977030U, 4236805024U, 3251091107U, - 2132092099U, 1774941330U, 1199868427U, 1452454533U, - 157007616U, 2904115357U, 342012276U, 595725824U, - 1480756522U, 206960106U, 497939518U, 591360097U, - 863170706U, 2375253569U, 3596610801U, 1814182875U, - 2094937945U, 3421402208U, 1082520231U, 3463918190U, - 2785509508U, 435703966U, 3908032597U, 1641649973U, - 2842273706U, 3305899714U, 1510255612U, 2148256476U, - 2655287854U, 3276092548U, 4258621189U, 236887753U, - 3681803219U, 274041037U, 1734335097U, 3815195456U, - 3317970021U, 1899903192U, 1026095262U, 4050517792U, - 356393447U, 2410691914U, 3873677099U, 3682840055U, - - 3913112168U, 2491498743U, 4132185628U, 2489919796U, - 1091903735U, 1979897079U, 3170134830U, 3567386728U, - 3557303409U, 857797738U, 1136121015U, 1342202287U, - 507115054U, 2535736646U, 337727348U, 3213592640U, - 1301675037U, 2528481711U, 1895095763U, 1721773893U, - 3216771564U, 62756741U, 2142006736U, 835421444U, - 2531993523U, 1442658625U, 3659876326U, 2882144922U, - 676362277U, 1392781812U, 170690266U, 3921047035U, - 1759253602U, 3611846912U, 1745797284U, 664899054U, - 1329594018U, 3901205900U, 3045908486U, 2062866102U, - 2865634940U, 3543621612U, 3464012697U, 1080764994U, - 553557557U, 3656615353U, 3996768171U, 991055499U, - 499776247U, 1265440854U, 648242737U, 3940784050U, - 980351604U, 3713745714U, 1749149687U, 3396870395U, - 4211799374U, 3640570775U, 1161844396U, 3125318951U, - 1431517754U, 545492359U, 4268468663U, 3499529547U, - 1437099964U, 2702547544U, 3433638243U, 2581715763U, - 2787789398U, 1060185593U, 1593081372U, 2418618748U, - 4260947970U, 69676912U, 2159744348U, 86519011U, - 2512459080U, 3838209314U, 1220612927U, 3339683548U, - 133810670U, 1090789135U, 1078426020U, 1569222167U, - 845107691U, 3583754449U, 4072456591U, 1091646820U, - 628848692U, 1613405280U, 3757631651U, 526609435U, - 236106946U, 48312990U, 2942717905U, 3402727701U, - 1797494240U, 859738849U, 992217954U, 4005476642U, - 2243076622U, 3870952857U, 3732016268U, 765654824U, - 3490871365U, 2511836413U, 1685915746U, 3888969200U, - 1414112111U, 2273134842U, 3281911079U, 4080962846U, - 172450625U, 2569994100U, 980381355U, 4109958455U, - 2819808352U, 2716589560U, 2568741196U, 3681446669U, - 3329971472U, 1835478071U, 660984891U, 3704678404U, - 4045999559U, 3422617507U, 3040415634U, 1762651403U, - 1719377915U, 3470491036U, 2693910283U, 3642056355U, - 3138596744U, 1364962596U, 2073328063U, 1983633131U, - 926494387U, 3423689081U, 2150032023U, 4096667949U, - 1749200295U, 3328846651U, 309677260U, 2016342300U, - 1779581495U, 3079819751U, 111262694U, 1274766160U, - 443224088U, 298511866U, 1025883608U, 3806446537U, - 1145181785U, 168956806U, 3641502830U, 3584813610U, - 1689216846U, 3666258015U, 3200248200U, 1692713982U, - 2646376535U, 4042768518U, 1618508792U, 1610833997U, - 3523052358U, 4130873264U, 2001055236U, 3610705100U, - 2202168115U, 4028541809U, 2961195399U, 1006657119U, - 2006996926U, 3186142756U, 1430667929U, 3210227297U, - 1314452623U, 4074634658U, 4101304120U, 2273951170U, - 1399257539U, 3367210612U, 3027628629U, 1190975929U, - 2062231137U, 2333990788U, 2221543033U, 2438960610U, - 1181637006U, 548689776U, 2362791313U, 3372408396U, - 3104550113U, 3145860560U, 296247880U, 1970579870U, - 3078560182U, 3769228297U, 1714227617U, 3291629107U, - 3898220290U, 166772364U, 1251581989U, 493813264U, - 448347421U, 195405023U, 2709975567U, 677966185U, - 3703036547U, 1463355134U, 2715995803U, 1338867538U, - 1343315457U, 2802222074U, 2684532164U, 233230375U, - 2599980071U, 2000651841U, 3277868038U, 1638401717U, - 4028070440U, 3237316320U, 6314154U, 819756386U, - 300326615U, 590932579U, 1405279636U, 3267499572U, - 3150704214U, 2428286686U, 3959192993U, 3461946742U, - 1862657033U, 1266418056U, 963775037U, 2089974820U, - 2263052895U, 1917689273U, 448879540U, 3550394620U, - 3981727096U, 150775221U, 3627908307U, 1303187396U, - 508620638U, 2975983352U, 2726630617U, 1817252668U, - 1876281319U, 1457606340U, 908771278U, 3720792119U, - 3617206836U, 2455994898U, 1729034894U, 1080033504U, - - 976866871U, 3556439503U, 2881648439U, 1522871579U, - 1555064734U, 1336096578U, 3548522304U, 2579274686U, - 3574697629U, 3205460757U, 3593280638U, 3338716283U, - 3079412587U, 564236357U, 2993598910U, 1781952180U, - 1464380207U, 3163844217U, 3332601554U, 1699332808U, - 1393555694U, 1183702653U, 3581086237U, 1288719814U, - 691649499U, 2847557200U, 2895455976U, 3193889540U, - 2717570544U, 1781354906U, 1676643554U, 2592534050U, - 3230253752U, 1126444790U, 2770207658U, 2633158820U, - 2210423226U, 2615765581U, 2414155088U, 3127139286U, - 673620729U, 2805611233U, 1269405062U, 4015350505U, - 3341807571U, 4149409754U, 1057255273U, 2012875353U, - 2162469141U, 2276492801U, 2601117357U, 993977747U, - 3918593370U, 2654263191U, 753973209U, 36408145U, - 2530585658U, 25011837U, 3520020182U, 2088578344U, - 530523599U, 2918365339U, 1524020338U, 1518925132U, - 3760827505U, 3759777254U, 1202760957U, 3985898139U, - 3906192525U, 674977740U, 4174734889U, 2031300136U, - 2019492241U, 3983892565U, 4153806404U, 3822280332U, - 352677332U, 2297720250U, 60907813U, 90501309U, - 3286998549U, 1016092578U, 2535922412U, 2839152426U, - 457141659U, 509813237U, 4120667899U, 652014361U, - 1966332200U, 2975202805U, 55981186U, 2327461051U, - 676427537U, 3255491064U, 2882294119U, 3433927263U, - 1307055953U, 942726286U, 933058658U, 2468411793U, - 3933900994U, 4215176142U, 1361170020U, 2001714738U, - 2830558078U, 3274259782U, 1222529897U, 1679025792U, - 2729314320U, 3714953764U, 1770335741U, 151462246U, - 3013232138U, 1682292957U, 1483529935U, 471910574U, - 1539241949U, 458788160U, 3436315007U, 1807016891U, - 3718408830U, 978976581U, 1043663428U, 3165965781U, - 1927990952U, 4200891579U, 2372276910U, 3208408903U, - 3533431907U, 1412390302U, 2931980059U, 4132332400U, - 1947078029U, 3881505623U, 4168226417U, 2941484381U, - 1077988104U, 1320477388U, 886195818U, 18198404U, - 3786409000U, 2509781533U, 112762804U, 3463356488U, - 1866414978U, 891333506U, 18488651U, 661792760U, - 1628790961U, 3885187036U, 3141171499U, 876946877U, - 2693282273U, 1372485963U, 791857591U, 2686433993U, - 3759982718U, 3167212022U, 3472953795U, 2716379847U, - 445679433U, 3561995674U, 3504004811U, 3574258232U, - 54117162U, 3331405415U, 2381918588U, 3769707343U, - 4154350007U, 1140177722U, 4074052095U, 668550556U, - 3214352940U, 367459370U, 261225585U, 2610173221U, - 4209349473U, 3468074219U, 3265815641U, 314222801U, - 3066103646U, 3808782860U, 282218597U, 3406013506U, - 3773591054U, 379116347U, 1285071038U, 846784868U, - 2669647154U, 3771962079U, 3550491691U, 2305946142U, - 453669953U, 1268987020U, 3317592352U, 3279303384U, - 3744833421U, 2610507566U, 3859509063U, 266596637U, - 3847019092U, 517658769U, 3462560207U, 3443424879U, - 370717030U, 4247526661U, 2224018117U, 4143653529U, - 4112773975U, 2788324899U, 2477274417U, 1456262402U, - 2901442914U, 1517677493U, 1846949527U, 2295493580U, - 3734397586U, 2176403920U, 1280348187U, 1908823572U, - 3871786941U, 846861322U, 1172426758U, 3287448474U, - 3383383037U, 1655181056U, 3139813346U, 901632758U, - 1897031941U, 2986607138U, 3066810236U, 3447102507U, - 1393639104U, 373351379U, 950779232U, 625454576U, - 3124240540U, 4148612726U, 2007998917U, 544563296U, - 2244738638U, 2330496472U, 2058025392U, 1291430526U, - 424198748U, 50039436U, 29584100U, 3605783033U, - 2429876329U, 2791104160U, 1057563949U, 3255363231U, - 3075367218U, 3463963227U, 1469046755U, 985887462U -}; - -NAMESPACE_END diff --git a/CryptoPP/blowfish.cpp b/CryptoPP/blowfish.cpp deleted file mode 100644 index aaa637cca..000000000 --- a/CryptoPP/blowfish.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// blowfish.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "blowfish.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -void Blowfish::Base::UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs &) -{ - AssertValidKeyLength(keylength); - - unsigned i, j=0, k; - word32 data, dspace[2] = {0, 0}; - - memcpy(pbox, p_init, sizeof(p_init)); - memcpy(sbox, s_init, sizeof(s_init)); - - // Xor key string into encryption key vector - for (i=0 ; i<ROUNDS+2 ; ++i) - { - data = 0 ; - for (k=0 ; k<4 ; ++k ) - data = (data << 8) | key_string[j++ % keylength]; - pbox[i] ^= data; - } - - crypt_block(dspace, pbox); - - for (i=0; i<ROUNDS; i+=2) - crypt_block(pbox+i, pbox+i+2); - - crypt_block(pbox+ROUNDS, sbox); - - for (i=0; i<4*256-2; i+=2) - crypt_block(sbox+i, sbox+i+2); - - if (!IsForwardTransformation()) - for (i=0; i<(ROUNDS+2)/2; i++) - std::swap(pbox[i], pbox[ROUNDS+1-i]); -} - -// this version is only used to make pbox and sbox -void Blowfish::Base::crypt_block(const word32 in[2], word32 out[2]) const -{ - word32 left = in[0]; - word32 right = in[1]; - - const word32 *const s=sbox; - const word32 *p=pbox; - - left ^= p[0]; - - for (unsigned i=0; i<ROUNDS/2; i++) - { - right ^= (((s[GETBYTE(left,3)] + s[256+GETBYTE(left,2)]) - ^ s[2*256+GETBYTE(left,1)]) + s[3*256+GETBYTE(left,0)]) - ^ p[2*i+1]; - - left ^= (((s[GETBYTE(right,3)] + s[256+GETBYTE(right,2)]) - ^ s[2*256+GETBYTE(right,1)]) + s[3*256+GETBYTE(right,0)]) - ^ p[2*i+2]; - } - - right ^= p[ROUNDS+1]; - - out[0] = right; - out[1] = left; -} - -void Blowfish::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - typedef BlockGetAndPut<word32, BigEndian> Block; - - word32 left, right; - Block::Get(inBlock)(left)(right); - - const word32 *const s=sbox; - const word32 *p=pbox; - - left ^= p[0]; - - for (unsigned i=0; i<ROUNDS/2; i++) - { - right ^= (((s[GETBYTE(left,3)] + s[256+GETBYTE(left,2)]) - ^ s[2*256+GETBYTE(left,1)]) + s[3*256+GETBYTE(left,0)]) - ^ p[2*i+1]; - - left ^= (((s[GETBYTE(right,3)] + s[256+GETBYTE(right,2)]) - ^ s[2*256+GETBYTE(right,1)]) + s[3*256+GETBYTE(right,0)]) - ^ p[2*i+2]; - } - - right ^= p[ROUNDS+1]; - - Block::Put(xorBlock, outBlock)(right)(left); -} - -NAMESPACE_END diff --git a/CryptoPP/blowfish.h b/CryptoPP/blowfish.h deleted file mode 100644 index ebc4f94d3..000000000 --- a/CryptoPP/blowfish.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef CRYPTOPP_BLOWFISH_H -#define CRYPTOPP_BLOWFISH_H - -/** \file */ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct Blowfish_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 4, 56>, public FixedRounds<16> -{ - static const char *StaticAlgorithmName() {return "Blowfish";} -}; - -//! <a href="http://www.weidai.com/scan-mirror/cs.html#Blowfish">Blowfish</a> -class Blowfish : public Blowfish_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Blowfish_Info> - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - void UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs ¶ms); - - private: - void crypt_block(const word32 in[2], word32 out[2]) const; - - static const word32 p_init[ROUNDS+2]; - static const word32 s_init[4*256]; - - FixedSizeSecBlock<word32, ROUNDS+2> pbox; - FixedSizeSecBlock<word32, 4*256> sbox; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Base> Encryption; - typedef BlockCipherFinal<DECRYPTION, Base> Decryption; -}; - -typedef Blowfish::Encryption BlowfishEncryption; -typedef Blowfish::Decryption BlowfishDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/blumshub.cpp b/CryptoPP/blumshub.cpp deleted file mode 100644 index be9b75829..000000000 --- a/CryptoPP/blumshub.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// blumshub.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "blumshub.h" - -NAMESPACE_BEGIN(CryptoPP) - -PublicBlumBlumShub::PublicBlumBlumShub(const Integer &n, const Integer &seed) - : modn(n), - maxBits(BitPrecision(n.BitCount())-1) -{ - current = modn.Square(modn.Square(seed)); - bitsLeft = maxBits; -} - -unsigned int PublicBlumBlumShub::GenerateBit() -{ - if (bitsLeft==0) - { - current = modn.Square(current); - bitsLeft = maxBits; - } - - return current.GetBit(--bitsLeft); -} - -byte PublicBlumBlumShub::GenerateByte() -{ - byte b=0; - for (int i=0; i<8; i++) - b = (b << 1) | PublicBlumBlumShub::GenerateBit(); - return b; -} - -void PublicBlumBlumShub::GenerateBlock(byte *output, size_t size) -{ - while (size--) - *output++ = PublicBlumBlumShub::GenerateByte(); -} - -void PublicBlumBlumShub::ProcessData(byte *outString, const byte *inString, size_t length) -{ - while (length--) - *outString++ = *inString++ ^ PublicBlumBlumShub::GenerateByte(); -} - -BlumBlumShub::BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed) - : PublicBlumBlumShub(p*q, seed), - p(p), q(q), - x0(modn.Square(seed)) -{ -} - -void BlumBlumShub::Seek(lword index) -{ - Integer i(Integer::POSITIVE, index); - i *= 8; - Integer e = a_exp_b_mod_c (2, i / maxBits + 1, (p-1)*(q-1)); - current = modn.Exponentiate(x0, e); - bitsLeft = maxBits - i % maxBits; -} - -NAMESPACE_END diff --git a/CryptoPP/blumshub.h b/CryptoPP/blumshub.h deleted file mode 100644 index 5e5074786..000000000 --- a/CryptoPP/blumshub.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef CRYPTOPP_BLUMSHUB_H -#define CRYPTOPP_BLUMSHUB_H - -#include "modarith.h" - -NAMESPACE_BEGIN(CryptoPP) - -class BlumGoldwasserPublicKey; -class BlumGoldwasserPrivateKey; - -//! BlumBlumShub without factorization of the modulus -class PublicBlumBlumShub : public RandomNumberGenerator, - public StreamTransformation -{ -public: - PublicBlumBlumShub(const Integer &n, const Integer &seed); - - unsigned int GenerateBit(); - byte GenerateByte(); - void GenerateBlock(byte *output, size_t size); - void ProcessData(byte *outString, const byte *inString, size_t length); - - bool IsSelfInverting() const {return true;} - bool IsForwardTransformation() const {return true;} - -protected: - ModularArithmetic modn; - word maxBits, bitsLeft; - Integer current; - - friend class BlumGoldwasserPublicKey; - friend class BlumGoldwasserPrivateKey; -}; - -//! BlumBlumShub with factorization of the modulus -class BlumBlumShub : public PublicBlumBlumShub -{ -public: - // Make sure p and q are both primes congruent to 3 mod 4 and at least 512 bits long, - // seed is the secret key and should be about as big as p*q - BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed); - - bool IsRandomAccess() const {return true;} - void Seek(lword index); - -protected: - const Integer p, q; - const Integer x0; -}; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/camellia.cpp b/CryptoPP/camellia.cpp deleted file mode 100644 index 80b3e2805..000000000 --- a/CryptoPP/camellia.cpp +++ /dev/null @@ -1,524 +0,0 @@ -// camellia.cpp - by Kevin Springle, 2003 -// This code is hereby placed in the public domain. - -/* -Optimisations and defense against timing attacks added in Jan 2007 by Wei Dai. - -The first 2 rounds and the last round seem especially vulnerable to timing -attacks. The protection is similar to what was implemented for Rijndael. -See comments at top of rijndael.cpp for more details. -*/ - -#include "pch.h" - -#include "camellia.h" -#include "misc.h" -#include "cpu.h" - -NAMESPACE_BEGIN(CryptoPP) - -// round implementation that uses a small table for protection against timing attacks -#define SLOW_ROUND(lh, ll, rh, rl, kh, kl) { \ - word32 zr = ll ^ kl; \ - word32 zl = lh ^ kh; \ - zr= rotlFixed(s1[GETBYTE(zr, 3)], 1) | \ - (rotrFixed(s1[GETBYTE(zr, 2)], 1) << 24) | \ - (s1[rotlFixed(CRYPTOPP_GET_BYTE_AS_BYTE(zr, 1),1)] << 16) | \ - (s1[GETBYTE(zr, 0)] << 8); \ - zl= (s1[GETBYTE(zl, 3)] << 24) | \ - (rotlFixed(s1[GETBYTE(zl, 2)], 1) << 16) | \ - (rotrFixed(s1[GETBYTE(zl, 1)], 1) << 8) | \ - s1[rotlFixed(CRYPTOPP_GET_BYTE_AS_BYTE(zl, 0), 1)]; \ - zl ^= zr; \ - zr = zl ^ rotlFixed(zr, 8); \ - zl = zr ^ rotrFixed(zl, 8); \ - rh ^= rotlFixed(zr, 16); \ - rh ^= zl; \ - rl ^= rotlFixed(zl, 8); \ - } - -// normal round - same output as above but using larger tables for faster speed -#define ROUND(lh, ll, rh, rl, kh, kl) { \ - word32 th = lh ^ kh; \ - word32 tl = ll ^ kl; \ - word32 d = SP[0][GETBYTE(tl,0)] ^ SP[1][GETBYTE(tl,3)] ^ SP[2][GETBYTE(tl,2)] ^ SP[3][GETBYTE(tl,1)]; \ - word32 u = SP[0][GETBYTE(th,3)] ^ SP[1][GETBYTE(th,2)] ^ SP[2][GETBYTE(th,1)] ^ SP[3][GETBYTE(th,0)]; \ - d ^= u; \ - rh ^= d; \ - rl ^= d; \ - rl ^= rotrFixed(u, 8);} - -#define DOUBLE_ROUND(lh, ll, rh, rl, k0, k1, k2, k3) \ - ROUND(lh, ll, rh, rl, k0, k1) \ - ROUND(rh, rl, lh, ll, k2, k3) - -#ifdef IS_LITTLE_ENDIAN -#define EFI(i) (1-(i)) -#else -#define EFI(i) (i) -#endif - -void Camellia::Base::UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs &) -{ - m_rounds = (keylen >= 24) ? 4 : 3; - unsigned int kslen = (8 * m_rounds + 2); - m_key.New(kslen*2); - word32 *ks32 = m_key.data(); - int m=0, a=0; - if (!IsForwardTransformation()) - m = -1, a = kslen-1; - - word32 kl0, kl1, kl2, kl3; - GetBlock<word32, BigEndian> getBlock(key); - getBlock(kl0)(kl1)(kl2)(kl3); - word32 k0=kl0, k1=kl1, k2=kl2, k3=kl3; - -#define CALC_ADDR2(base, i, j) ((byte *)(base)+8*(i)+4*(j)+((-16*(i))&m)) -#define CALC_ADDR(base, i) CALC_ADDR2(base, i, 0) - -#if 1 - word64 kwl, kwr; - ks32 += 2*a; -#define PREPARE_KS_ROUNDS \ - kwl = (word64(k0) << 32) | k1; \ - kwr = (word64(k2) << 32) | k3 -#define KS_ROUND_0(i) \ - *(word64*)CALC_ADDR(ks32, i+EFI(0)) = kwl; \ - *(word64*)CALC_ADDR(ks32, i+EFI(1)) = kwr -#define KS_ROUND(i, r, which) \ - if (which & (1<<int(r<64))) *(word64*)CALC_ADDR(ks32, i+EFI(r<64)) = (kwr << (r%64)) | (kwl >> (64 - (r%64))); \ - if (which & (1<<int(r>64))) *(word64*)CALC_ADDR(ks32, i+EFI(r>64)) = (kwl << (r%64)) | (kwr >> (64 - (r%64))) -#else - // SSE2 version is 30% faster on Intel Core 2. Doesn't seem worth the hassle of maintenance, but left here - // #if'd out in case someone needs it. - __m128i kw, kw2; - __m128i *ks128 = (__m128i *)ks32+a/2; - ks32 += 2*a; -#define PREPARE_KS_ROUNDS \ - kw = _mm_set_epi32(k0, k1, k2, k3); \ - if (m) kw2 = kw, kw = _mm_shuffle_epi32(kw, _MM_SHUFFLE(1, 0, 3, 2)); \ - else kw2 = _mm_shuffle_epi32(kw, _MM_SHUFFLE(1, 0, 3, 2)) -#define KS_ROUND_0(i) \ - _mm_store_si128((__m128i *)CALC_ADDR(ks128, i), kw) -#define KS_ROUND(i, r, which) { \ - __m128i temp; \ - if (r<64 && (which!=1 || m)) temp = _mm_or_si128(_mm_slli_epi64(kw, r%64), _mm_srli_epi64(kw2, 64-r%64)); \ - else temp = _mm_or_si128(_mm_slli_epi64(kw2, r%64), _mm_srli_epi64(kw, 64-r%64)); \ - if (which & 2) _mm_store_si128((__m128i *)CALC_ADDR(ks128, i), temp); \ - else _mm_storel_epi64((__m128i*)CALC_ADDR(ks32, i+EFI(0)), temp); \ - } -#endif - - if (keylen == 16) - { - // KL - PREPARE_KS_ROUNDS; - KS_ROUND_0(0); - KS_ROUND(4, 15, 3); - KS_ROUND(10, 45, 3); - KS_ROUND(12, 60, 2); - KS_ROUND(16, 77, 3); - KS_ROUND(18, 94, 3); - KS_ROUND(22, 111, 3); - - // KA - k0=kl0, k1=kl1, k2=kl2, k3=kl3; - DOUBLE_ROUND(k0, k1, k2, k3, 0xA09E667Ful, 0x3BCC908Bul, 0xB67AE858ul, 0x4CAA73B2ul); - k0^=kl0, k1^=kl1, k2^=kl2, k3^=kl3; - DOUBLE_ROUND(k0, k1, k2, k3, 0xC6EF372Ful, 0xE94F82BEul, 0x54FF53A5ul, 0xF1D36F1Cul); - - PREPARE_KS_ROUNDS; - KS_ROUND_0(2); - KS_ROUND(6, 15, 3); - KS_ROUND(8, 30, 3); - KS_ROUND(12, 45, 1); - KS_ROUND(14, 60, 3); - KS_ROUND(20, 94, 3); - KS_ROUND(24, 47, 3); - } - else - { - // KL - PREPARE_KS_ROUNDS; - KS_ROUND_0(0); - KS_ROUND(12, 45, 3); - KS_ROUND(16, 60, 3); - KS_ROUND(22, 77, 3); - KS_ROUND(30, 111, 3); - - // KR - word32 kr0, kr1, kr2, kr3; - GetBlock<word32, BigEndian>(key+16)(kr0)(kr1); - if (keylen == 24) - kr2 = ~kr0, kr3 = ~kr1; - else - GetBlock<word32, BigEndian>(key+24)(kr2)(kr3); - k0=kr0, k1=kr1, k2=kr2, k3=kr3; - - PREPARE_KS_ROUNDS; - KS_ROUND(4, 15, 3); - KS_ROUND(8, 30, 3); - KS_ROUND(18, 60, 3); - KS_ROUND(26, 94, 3); - - // KA - k0^=kl0, k1^=kl1, k2^=kl2, k3^=kl3; - DOUBLE_ROUND(k0, k1, k2, k3, 0xA09E667Ful, 0x3BCC908Bul, 0xB67AE858ul, 0x4CAA73B2ul); - k0^=kl0, k1^=kl1, k2^=kl2, k3^=kl3; - DOUBLE_ROUND(k0, k1, k2, k3, 0xC6EF372Ful, 0xE94F82BEul, 0x54FF53A5ul, 0xF1D36F1Cul); - - PREPARE_KS_ROUNDS; - KS_ROUND(6, 15, 3); - KS_ROUND(14, 45, 3); - KS_ROUND(24, 77, 3); - KS_ROUND(28, 94, 3); - - // KB - k0^=kr0, k1^=kr1, k2^=kr2, k3^=kr3; - DOUBLE_ROUND(k0, k1, k2, k3, 0x10E527FAul, 0xDE682D1Dul, 0xB05688C2ul, 0xB3E6C1FDul); - - PREPARE_KS_ROUNDS; - KS_ROUND_0(2); - KS_ROUND(10, 30, 3); - KS_ROUND(20, 60, 3); - KS_ROUND(32, 47, 3); - } -} - -void Camellia::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ -#define KS(i, j) ks[i*4 + EFI(j/2)*2 + EFI(j%2)] - -#define FL(klh, kll, krh, krl) \ - ll ^= rotlFixed(lh & klh, 1); \ - lh ^= (ll | kll); \ - rh ^= (rl | krl); \ - rl ^= rotlFixed(rh & krh, 1); - - word32 lh, ll, rh, rl; - typedef BlockGetAndPut<word32, BigEndian> Block; - Block::Get(inBlock)(lh)(ll)(rh)(rl); - const word32 *ks = m_key.data(); - lh ^= KS(0,0); - ll ^= KS(0,1); - rh ^= KS(0,2); - rl ^= KS(0,3); - - // timing attack countermeasure. see comments at top for more details - const int cacheLineSize = GetCacheLineSize(); - unsigned int i; - word32 u = 0; - for (i=0; i<256; i+=cacheLineSize) - u &= *(const word32 *)(s1+i); - u &= *(const word32 *)(s1+252); - lh |= u; ll |= u; - - SLOW_ROUND(lh, ll, rh, rl, KS(1,0), KS(1,1)) - SLOW_ROUND(rh, rl, lh, ll, KS(1,2), KS(1,3)) - for (i = m_rounds-1; i > 0; --i) - { - DOUBLE_ROUND(lh, ll, rh, rl, KS(2,0), KS(2,1), KS(2,2), KS(2,3)) - DOUBLE_ROUND(lh, ll, rh, rl, KS(3,0), KS(3,1), KS(3,2), KS(3,3)) - FL(KS(4,0), KS(4,1), KS(4,2), KS(4,3)); - DOUBLE_ROUND(lh, ll, rh, rl, KS(5,0), KS(5,1), KS(5,2), KS(5,3)) - ks += 16; - } - DOUBLE_ROUND(lh, ll, rh, rl, KS(2,0), KS(2,1), KS(2,2), KS(2,3)) - ROUND(lh, ll, rh, rl, KS(3,0), KS(3,1)) - SLOW_ROUND(rh, rl, lh, ll, KS(3,2), KS(3,3)) - lh ^= KS(4,0); - ll ^= KS(4,1); - rh ^= KS(4,2); - rl ^= KS(4,3); - Block::Put(xorBlock, outBlock)(rh)(rl)(lh)(ll); -} - -// The Camellia s-boxes - -const byte Camellia::Base::s1[256] = -{ - 112,130,44,236,179,39,192,229,228,133,87,53,234,12,174,65, - 35,239,107,147,69,25,165,33,237,14,79,78,29,101,146,189, - 134,184,175,143,124,235,31,206,62,48,220,95,94,197,11,26, - 166,225,57,202,213,71,93,61,217,1,90,214,81,86,108,77, - 139,13,154,102,251,204,176,45,116,18,43,32,240,177,132,153, - 223,76,203,194,52,126,118,5,109,183,169,49,209,23,4,215, - 20,88,58,97,222,27,17,28,50,15,156,22,83,24,242,34, - 254,68,207,178,195,181,122,145,36,8,232,168,96,252,105,80, - 170,208,160,125,161,137,98,151,84,91,30,149,224,255,100,210, - 16,196,0,72,163,247,117,219,138,3,230,218,9,63,221,148, - 135,92,131,2,205,74,144,51,115,103,246,243,157,127,191,226, - 82,155,216,38,200,55,198,59,129,150,111,75,19,190,99,46, - 233,121,167,140,159,110,188,142,41,245,249,182,47,253,180,89, - 120,152,6,106,231,70,113,186,212,37,171,66,136,162,141,250, - 114,7,185,85,248,238,172,10,54,73,42,104,60,56,241,164, - 64,40,211,123,187,201,67,193,21,227,173,244,119,199,128,158 -}; - -const word32 Camellia::Base::SP[4][256] = { - { - 0x70707000, 0x82828200, 0x2c2c2c00, 0xececec00, - 0xb3b3b300, 0x27272700, 0xc0c0c000, 0xe5e5e500, - 0xe4e4e400, 0x85858500, 0x57575700, 0x35353500, - 0xeaeaea00, 0x0c0c0c00, 0xaeaeae00, 0x41414100, - 0x23232300, 0xefefef00, 0x6b6b6b00, 0x93939300, - 0x45454500, 0x19191900, 0xa5a5a500, 0x21212100, - 0xededed00, 0x0e0e0e00, 0x4f4f4f00, 0x4e4e4e00, - 0x1d1d1d00, 0x65656500, 0x92929200, 0xbdbdbd00, - 0x86868600, 0xb8b8b800, 0xafafaf00, 0x8f8f8f00, - 0x7c7c7c00, 0xebebeb00, 0x1f1f1f00, 0xcecece00, - 0x3e3e3e00, 0x30303000, 0xdcdcdc00, 0x5f5f5f00, - 0x5e5e5e00, 0xc5c5c500, 0x0b0b0b00, 0x1a1a1a00, - 0xa6a6a600, 0xe1e1e100, 0x39393900, 0xcacaca00, - 0xd5d5d500, 0x47474700, 0x5d5d5d00, 0x3d3d3d00, - 0xd9d9d900, 0x01010100, 0x5a5a5a00, 0xd6d6d600, - 0x51515100, 0x56565600, 0x6c6c6c00, 0x4d4d4d00, - 0x8b8b8b00, 0x0d0d0d00, 0x9a9a9a00, 0x66666600, - 0xfbfbfb00, 0xcccccc00, 0xb0b0b000, 0x2d2d2d00, - 0x74747400, 0x12121200, 0x2b2b2b00, 0x20202000, - 0xf0f0f000, 0xb1b1b100, 0x84848400, 0x99999900, - 0xdfdfdf00, 0x4c4c4c00, 0xcbcbcb00, 0xc2c2c200, - 0x34343400, 0x7e7e7e00, 0x76767600, 0x05050500, - 0x6d6d6d00, 0xb7b7b700, 0xa9a9a900, 0x31313100, - 0xd1d1d100, 0x17171700, 0x04040400, 0xd7d7d700, - 0x14141400, 0x58585800, 0x3a3a3a00, 0x61616100, - 0xdedede00, 0x1b1b1b00, 0x11111100, 0x1c1c1c00, - 0x32323200, 0x0f0f0f00, 0x9c9c9c00, 0x16161600, - 0x53535300, 0x18181800, 0xf2f2f200, 0x22222200, - 0xfefefe00, 0x44444400, 0xcfcfcf00, 0xb2b2b200, - 0xc3c3c300, 0xb5b5b500, 0x7a7a7a00, 0x91919100, - 0x24242400, 0x08080800, 0xe8e8e800, 0xa8a8a800, - 0x60606000, 0xfcfcfc00, 0x69696900, 0x50505000, - 0xaaaaaa00, 0xd0d0d000, 0xa0a0a000, 0x7d7d7d00, - 0xa1a1a100, 0x89898900, 0x62626200, 0x97979700, - 0x54545400, 0x5b5b5b00, 0x1e1e1e00, 0x95959500, - 0xe0e0e000, 0xffffff00, 0x64646400, 0xd2d2d200, - 0x10101000, 0xc4c4c400, 0x00000000, 0x48484800, - 0xa3a3a300, 0xf7f7f700, 0x75757500, 0xdbdbdb00, - 0x8a8a8a00, 0x03030300, 0xe6e6e600, 0xdadada00, - 0x09090900, 0x3f3f3f00, 0xdddddd00, 0x94949400, - 0x87878700, 0x5c5c5c00, 0x83838300, 0x02020200, - 0xcdcdcd00, 0x4a4a4a00, 0x90909000, 0x33333300, - 0x73737300, 0x67676700, 0xf6f6f600, 0xf3f3f300, - 0x9d9d9d00, 0x7f7f7f00, 0xbfbfbf00, 0xe2e2e200, - 0x52525200, 0x9b9b9b00, 0xd8d8d800, 0x26262600, - 0xc8c8c800, 0x37373700, 0xc6c6c600, 0x3b3b3b00, - 0x81818100, 0x96969600, 0x6f6f6f00, 0x4b4b4b00, - 0x13131300, 0xbebebe00, 0x63636300, 0x2e2e2e00, - 0xe9e9e900, 0x79797900, 0xa7a7a700, 0x8c8c8c00, - 0x9f9f9f00, 0x6e6e6e00, 0xbcbcbc00, 0x8e8e8e00, - 0x29292900, 0xf5f5f500, 0xf9f9f900, 0xb6b6b600, - 0x2f2f2f00, 0xfdfdfd00, 0xb4b4b400, 0x59595900, - 0x78787800, 0x98989800, 0x06060600, 0x6a6a6a00, - 0xe7e7e700, 0x46464600, 0x71717100, 0xbababa00, - 0xd4d4d400, 0x25252500, 0xababab00, 0x42424200, - 0x88888800, 0xa2a2a200, 0x8d8d8d00, 0xfafafa00, - 0x72727200, 0x07070700, 0xb9b9b900, 0x55555500, - 0xf8f8f800, 0xeeeeee00, 0xacacac00, 0x0a0a0a00, - 0x36363600, 0x49494900, 0x2a2a2a00, 0x68686800, - 0x3c3c3c00, 0x38383800, 0xf1f1f100, 0xa4a4a400, - 0x40404000, 0x28282800, 0xd3d3d300, 0x7b7b7b00, - 0xbbbbbb00, 0xc9c9c900, 0x43434300, 0xc1c1c100, - 0x15151500, 0xe3e3e300, 0xadadad00, 0xf4f4f400, - 0x77777700, 0xc7c7c700, 0x80808000, 0x9e9e9e00 - }, - { - 0x00e0e0e0, 0x00050505, 0x00585858, 0x00d9d9d9, - 0x00676767, 0x004e4e4e, 0x00818181, 0x00cbcbcb, - 0x00c9c9c9, 0x000b0b0b, 0x00aeaeae, 0x006a6a6a, - 0x00d5d5d5, 0x00181818, 0x005d5d5d, 0x00828282, - 0x00464646, 0x00dfdfdf, 0x00d6d6d6, 0x00272727, - 0x008a8a8a, 0x00323232, 0x004b4b4b, 0x00424242, - 0x00dbdbdb, 0x001c1c1c, 0x009e9e9e, 0x009c9c9c, - 0x003a3a3a, 0x00cacaca, 0x00252525, 0x007b7b7b, - 0x000d0d0d, 0x00717171, 0x005f5f5f, 0x001f1f1f, - 0x00f8f8f8, 0x00d7d7d7, 0x003e3e3e, 0x009d9d9d, - 0x007c7c7c, 0x00606060, 0x00b9b9b9, 0x00bebebe, - 0x00bcbcbc, 0x008b8b8b, 0x00161616, 0x00343434, - 0x004d4d4d, 0x00c3c3c3, 0x00727272, 0x00959595, - 0x00ababab, 0x008e8e8e, 0x00bababa, 0x007a7a7a, - 0x00b3b3b3, 0x00020202, 0x00b4b4b4, 0x00adadad, - 0x00a2a2a2, 0x00acacac, 0x00d8d8d8, 0x009a9a9a, - 0x00171717, 0x001a1a1a, 0x00353535, 0x00cccccc, - 0x00f7f7f7, 0x00999999, 0x00616161, 0x005a5a5a, - 0x00e8e8e8, 0x00242424, 0x00565656, 0x00404040, - 0x00e1e1e1, 0x00636363, 0x00090909, 0x00333333, - 0x00bfbfbf, 0x00989898, 0x00979797, 0x00858585, - 0x00686868, 0x00fcfcfc, 0x00ececec, 0x000a0a0a, - 0x00dadada, 0x006f6f6f, 0x00535353, 0x00626262, - 0x00a3a3a3, 0x002e2e2e, 0x00080808, 0x00afafaf, - 0x00282828, 0x00b0b0b0, 0x00747474, 0x00c2c2c2, - 0x00bdbdbd, 0x00363636, 0x00222222, 0x00383838, - 0x00646464, 0x001e1e1e, 0x00393939, 0x002c2c2c, - 0x00a6a6a6, 0x00303030, 0x00e5e5e5, 0x00444444, - 0x00fdfdfd, 0x00888888, 0x009f9f9f, 0x00656565, - 0x00878787, 0x006b6b6b, 0x00f4f4f4, 0x00232323, - 0x00484848, 0x00101010, 0x00d1d1d1, 0x00515151, - 0x00c0c0c0, 0x00f9f9f9, 0x00d2d2d2, 0x00a0a0a0, - 0x00555555, 0x00a1a1a1, 0x00414141, 0x00fafafa, - 0x00434343, 0x00131313, 0x00c4c4c4, 0x002f2f2f, - 0x00a8a8a8, 0x00b6b6b6, 0x003c3c3c, 0x002b2b2b, - 0x00c1c1c1, 0x00ffffff, 0x00c8c8c8, 0x00a5a5a5, - 0x00202020, 0x00898989, 0x00000000, 0x00909090, - 0x00474747, 0x00efefef, 0x00eaeaea, 0x00b7b7b7, - 0x00151515, 0x00060606, 0x00cdcdcd, 0x00b5b5b5, - 0x00121212, 0x007e7e7e, 0x00bbbbbb, 0x00292929, - 0x000f0f0f, 0x00b8b8b8, 0x00070707, 0x00040404, - 0x009b9b9b, 0x00949494, 0x00212121, 0x00666666, - 0x00e6e6e6, 0x00cecece, 0x00ededed, 0x00e7e7e7, - 0x003b3b3b, 0x00fefefe, 0x007f7f7f, 0x00c5c5c5, - 0x00a4a4a4, 0x00373737, 0x00b1b1b1, 0x004c4c4c, - 0x00919191, 0x006e6e6e, 0x008d8d8d, 0x00767676, - 0x00030303, 0x002d2d2d, 0x00dedede, 0x00969696, - 0x00262626, 0x007d7d7d, 0x00c6c6c6, 0x005c5c5c, - 0x00d3d3d3, 0x00f2f2f2, 0x004f4f4f, 0x00191919, - 0x003f3f3f, 0x00dcdcdc, 0x00797979, 0x001d1d1d, - 0x00525252, 0x00ebebeb, 0x00f3f3f3, 0x006d6d6d, - 0x005e5e5e, 0x00fbfbfb, 0x00696969, 0x00b2b2b2, - 0x00f0f0f0, 0x00313131, 0x000c0c0c, 0x00d4d4d4, - 0x00cfcfcf, 0x008c8c8c, 0x00e2e2e2, 0x00757575, - 0x00a9a9a9, 0x004a4a4a, 0x00575757, 0x00848484, - 0x00111111, 0x00454545, 0x001b1b1b, 0x00f5f5f5, - 0x00e4e4e4, 0x000e0e0e, 0x00737373, 0x00aaaaaa, - 0x00f1f1f1, 0x00dddddd, 0x00595959, 0x00141414, - 0x006c6c6c, 0x00929292, 0x00545454, 0x00d0d0d0, - 0x00787878, 0x00707070, 0x00e3e3e3, 0x00494949, - 0x00808080, 0x00505050, 0x00a7a7a7, 0x00f6f6f6, - 0x00777777, 0x00939393, 0x00868686, 0x00838383, - 0x002a2a2a, 0x00c7c7c7, 0x005b5b5b, 0x00e9e9e9, - 0x00eeeeee, 0x008f8f8f, 0x00010101, 0x003d3d3d - }, - { - 0x38003838, 0x41004141, 0x16001616, 0x76007676, - 0xd900d9d9, 0x93009393, 0x60006060, 0xf200f2f2, - 0x72007272, 0xc200c2c2, 0xab00abab, 0x9a009a9a, - 0x75007575, 0x06000606, 0x57005757, 0xa000a0a0, - 0x91009191, 0xf700f7f7, 0xb500b5b5, 0xc900c9c9, - 0xa200a2a2, 0x8c008c8c, 0xd200d2d2, 0x90009090, - 0xf600f6f6, 0x07000707, 0xa700a7a7, 0x27002727, - 0x8e008e8e, 0xb200b2b2, 0x49004949, 0xde00dede, - 0x43004343, 0x5c005c5c, 0xd700d7d7, 0xc700c7c7, - 0x3e003e3e, 0xf500f5f5, 0x8f008f8f, 0x67006767, - 0x1f001f1f, 0x18001818, 0x6e006e6e, 0xaf00afaf, - 0x2f002f2f, 0xe200e2e2, 0x85008585, 0x0d000d0d, - 0x53005353, 0xf000f0f0, 0x9c009c9c, 0x65006565, - 0xea00eaea, 0xa300a3a3, 0xae00aeae, 0x9e009e9e, - 0xec00ecec, 0x80008080, 0x2d002d2d, 0x6b006b6b, - 0xa800a8a8, 0x2b002b2b, 0x36003636, 0xa600a6a6, - 0xc500c5c5, 0x86008686, 0x4d004d4d, 0x33003333, - 0xfd00fdfd, 0x66006666, 0x58005858, 0x96009696, - 0x3a003a3a, 0x09000909, 0x95009595, 0x10001010, - 0x78007878, 0xd800d8d8, 0x42004242, 0xcc00cccc, - 0xef00efef, 0x26002626, 0xe500e5e5, 0x61006161, - 0x1a001a1a, 0x3f003f3f, 0x3b003b3b, 0x82008282, - 0xb600b6b6, 0xdb00dbdb, 0xd400d4d4, 0x98009898, - 0xe800e8e8, 0x8b008b8b, 0x02000202, 0xeb00ebeb, - 0x0a000a0a, 0x2c002c2c, 0x1d001d1d, 0xb000b0b0, - 0x6f006f6f, 0x8d008d8d, 0x88008888, 0x0e000e0e, - 0x19001919, 0x87008787, 0x4e004e4e, 0x0b000b0b, - 0xa900a9a9, 0x0c000c0c, 0x79007979, 0x11001111, - 0x7f007f7f, 0x22002222, 0xe700e7e7, 0x59005959, - 0xe100e1e1, 0xda00dada, 0x3d003d3d, 0xc800c8c8, - 0x12001212, 0x04000404, 0x74007474, 0x54005454, - 0x30003030, 0x7e007e7e, 0xb400b4b4, 0x28002828, - 0x55005555, 0x68006868, 0x50005050, 0xbe00bebe, - 0xd000d0d0, 0xc400c4c4, 0x31003131, 0xcb00cbcb, - 0x2a002a2a, 0xad00adad, 0x0f000f0f, 0xca00caca, - 0x70007070, 0xff00ffff, 0x32003232, 0x69006969, - 0x08000808, 0x62006262, 0x00000000, 0x24002424, - 0xd100d1d1, 0xfb00fbfb, 0xba00baba, 0xed00eded, - 0x45004545, 0x81008181, 0x73007373, 0x6d006d6d, - 0x84008484, 0x9f009f9f, 0xee00eeee, 0x4a004a4a, - 0xc300c3c3, 0x2e002e2e, 0xc100c1c1, 0x01000101, - 0xe600e6e6, 0x25002525, 0x48004848, 0x99009999, - 0xb900b9b9, 0xb300b3b3, 0x7b007b7b, 0xf900f9f9, - 0xce00cece, 0xbf00bfbf, 0xdf00dfdf, 0x71007171, - 0x29002929, 0xcd00cdcd, 0x6c006c6c, 0x13001313, - 0x64006464, 0x9b009b9b, 0x63006363, 0x9d009d9d, - 0xc000c0c0, 0x4b004b4b, 0xb700b7b7, 0xa500a5a5, - 0x89008989, 0x5f005f5f, 0xb100b1b1, 0x17001717, - 0xf400f4f4, 0xbc00bcbc, 0xd300d3d3, 0x46004646, - 0xcf00cfcf, 0x37003737, 0x5e005e5e, 0x47004747, - 0x94009494, 0xfa00fafa, 0xfc00fcfc, 0x5b005b5b, - 0x97009797, 0xfe00fefe, 0x5a005a5a, 0xac00acac, - 0x3c003c3c, 0x4c004c4c, 0x03000303, 0x35003535, - 0xf300f3f3, 0x23002323, 0xb800b8b8, 0x5d005d5d, - 0x6a006a6a, 0x92009292, 0xd500d5d5, 0x21002121, - 0x44004444, 0x51005151, 0xc600c6c6, 0x7d007d7d, - 0x39003939, 0x83008383, 0xdc00dcdc, 0xaa00aaaa, - 0x7c007c7c, 0x77007777, 0x56005656, 0x05000505, - 0x1b001b1b, 0xa400a4a4, 0x15001515, 0x34003434, - 0x1e001e1e, 0x1c001c1c, 0xf800f8f8, 0x52005252, - 0x20002020, 0x14001414, 0xe900e9e9, 0xbd00bdbd, - 0xdd00dddd, 0xe400e4e4, 0xa100a1a1, 0xe000e0e0, - 0x8a008a8a, 0xf100f1f1, 0xd600d6d6, 0x7a007a7a, - 0xbb00bbbb, 0xe300e3e3, 0x40004040, 0x4f004f4f - }, - { - 0x70700070, 0x2c2c002c, 0xb3b300b3, 0xc0c000c0, - 0xe4e400e4, 0x57570057, 0xeaea00ea, 0xaeae00ae, - 0x23230023, 0x6b6b006b, 0x45450045, 0xa5a500a5, - 0xeded00ed, 0x4f4f004f, 0x1d1d001d, 0x92920092, - 0x86860086, 0xafaf00af, 0x7c7c007c, 0x1f1f001f, - 0x3e3e003e, 0xdcdc00dc, 0x5e5e005e, 0x0b0b000b, - 0xa6a600a6, 0x39390039, 0xd5d500d5, 0x5d5d005d, - 0xd9d900d9, 0x5a5a005a, 0x51510051, 0x6c6c006c, - 0x8b8b008b, 0x9a9a009a, 0xfbfb00fb, 0xb0b000b0, - 0x74740074, 0x2b2b002b, 0xf0f000f0, 0x84840084, - 0xdfdf00df, 0xcbcb00cb, 0x34340034, 0x76760076, - 0x6d6d006d, 0xa9a900a9, 0xd1d100d1, 0x04040004, - 0x14140014, 0x3a3a003a, 0xdede00de, 0x11110011, - 0x32320032, 0x9c9c009c, 0x53530053, 0xf2f200f2, - 0xfefe00fe, 0xcfcf00cf, 0xc3c300c3, 0x7a7a007a, - 0x24240024, 0xe8e800e8, 0x60600060, 0x69690069, - 0xaaaa00aa, 0xa0a000a0, 0xa1a100a1, 0x62620062, - 0x54540054, 0x1e1e001e, 0xe0e000e0, 0x64640064, - 0x10100010, 0x00000000, 0xa3a300a3, 0x75750075, - 0x8a8a008a, 0xe6e600e6, 0x09090009, 0xdddd00dd, - 0x87870087, 0x83830083, 0xcdcd00cd, 0x90900090, - 0x73730073, 0xf6f600f6, 0x9d9d009d, 0xbfbf00bf, - 0x52520052, 0xd8d800d8, 0xc8c800c8, 0xc6c600c6, - 0x81810081, 0x6f6f006f, 0x13130013, 0x63630063, - 0xe9e900e9, 0xa7a700a7, 0x9f9f009f, 0xbcbc00bc, - 0x29290029, 0xf9f900f9, 0x2f2f002f, 0xb4b400b4, - 0x78780078, 0x06060006, 0xe7e700e7, 0x71710071, - 0xd4d400d4, 0xabab00ab, 0x88880088, 0x8d8d008d, - 0x72720072, 0xb9b900b9, 0xf8f800f8, 0xacac00ac, - 0x36360036, 0x2a2a002a, 0x3c3c003c, 0xf1f100f1, - 0x40400040, 0xd3d300d3, 0xbbbb00bb, 0x43430043, - 0x15150015, 0xadad00ad, 0x77770077, 0x80800080, - 0x82820082, 0xecec00ec, 0x27270027, 0xe5e500e5, - 0x85850085, 0x35350035, 0x0c0c000c, 0x41410041, - 0xefef00ef, 0x93930093, 0x19190019, 0x21210021, - 0x0e0e000e, 0x4e4e004e, 0x65650065, 0xbdbd00bd, - 0xb8b800b8, 0x8f8f008f, 0xebeb00eb, 0xcece00ce, - 0x30300030, 0x5f5f005f, 0xc5c500c5, 0x1a1a001a, - 0xe1e100e1, 0xcaca00ca, 0x47470047, 0x3d3d003d, - 0x01010001, 0xd6d600d6, 0x56560056, 0x4d4d004d, - 0x0d0d000d, 0x66660066, 0xcccc00cc, 0x2d2d002d, - 0x12120012, 0x20200020, 0xb1b100b1, 0x99990099, - 0x4c4c004c, 0xc2c200c2, 0x7e7e007e, 0x05050005, - 0xb7b700b7, 0x31310031, 0x17170017, 0xd7d700d7, - 0x58580058, 0x61610061, 0x1b1b001b, 0x1c1c001c, - 0x0f0f000f, 0x16160016, 0x18180018, 0x22220022, - 0x44440044, 0xb2b200b2, 0xb5b500b5, 0x91910091, - 0x08080008, 0xa8a800a8, 0xfcfc00fc, 0x50500050, - 0xd0d000d0, 0x7d7d007d, 0x89890089, 0x97970097, - 0x5b5b005b, 0x95950095, 0xffff00ff, 0xd2d200d2, - 0xc4c400c4, 0x48480048, 0xf7f700f7, 0xdbdb00db, - 0x03030003, 0xdada00da, 0x3f3f003f, 0x94940094, - 0x5c5c005c, 0x02020002, 0x4a4a004a, 0x33330033, - 0x67670067, 0xf3f300f3, 0x7f7f007f, 0xe2e200e2, - 0x9b9b009b, 0x26260026, 0x37370037, 0x3b3b003b, - 0x96960096, 0x4b4b004b, 0xbebe00be, 0x2e2e002e, - 0x79790079, 0x8c8c008c, 0x6e6e006e, 0x8e8e008e, - 0xf5f500f5, 0xb6b600b6, 0xfdfd00fd, 0x59590059, - 0x98980098, 0x6a6a006a, 0x46460046, 0xbaba00ba, - 0x25250025, 0x42420042, 0xa2a200a2, 0xfafa00fa, - 0x07070007, 0x55550055, 0xeeee00ee, 0x0a0a000a, - 0x49490049, 0x68680068, 0x38380038, 0xa4a400a4, - 0x28280028, 0x7b7b007b, 0xc9c900c9, 0xc1c100c1, - 0xe3e300e3, 0xf4f400f4, 0xc7c700c7, 0x9e9e009e - }}; - -NAMESPACE_END diff --git a/CryptoPP/camellia.h b/CryptoPP/camellia.h deleted file mode 100644 index d8700cb8c..000000000 --- a/CryptoPP/camellia.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef CRYPTOPP_CAMELLIA_H -#define CRYPTOPP_CAMELLIA_H - -#include "config.h" - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct Camellia_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32, 8> -{ - static const char *StaticAlgorithmName() {return "Camellia";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#Camellia">Camellia</a> -class Camellia : public Camellia_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Camellia_Info> - { - public: - void UncheckedSetKey(const byte *key, unsigned int keylen, const NameValuePairs ¶ms); - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - - protected: - static const byte s1[256]; - static const word32 SP[4][256]; - - unsigned int m_rounds; - SecBlock<word32> m_key; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Base> Encryption; - typedef BlockCipherFinal<DECRYPTION, Base> Decryption; -}; - -typedef Camellia::Encryption CamelliaEncryption; -typedef Camellia::Decryption CamelliaDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/cast.cpp b/CryptoPP/cast.cpp deleted file mode 100644 index ef0a5efdb..000000000 --- a/CryptoPP/cast.cpp +++ /dev/null @@ -1,296 +0,0 @@ -// cast.cpp - written and placed in the public domain by Wei Dai and Leonard Janke -// based on Steve Reid's public domain cast.c - -#include "pch.h" -#include "cast.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -/* Macros to access 8-bit bytes out of a 32-bit word */ -#define U8a(x) GETBYTE(x,3) -#define U8b(x) GETBYTE(x,2) -#define U8c(x) GETBYTE(x,1) -#define U8d(x) GETBYTE(x,0) - -/* CAST uses three different round functions */ -#define f1(l, r, km, kr) \ - t = rotlVariable(km + r, kr); \ - l ^= ((S[0][U8a(t)] ^ S[1][U8b(t)]) - \ - S[2][U8c(t)]) + S[3][U8d(t)]; -#define f2(l, r, km, kr) \ - t = rotlVariable(km ^ r, kr); \ - l ^= ((S[0][U8a(t)] - S[1][U8b(t)]) + \ - S[2][U8c(t)]) ^ S[3][U8d(t)]; -#define f3(l, r, km, kr) \ - t = rotlVariable(km - r, kr); \ - l ^= ((S[0][U8a(t)] + S[1][U8b(t)]) ^ \ - S[2][U8c(t)]) - S[3][U8d(t)]; - -#define F1(l, r, i, j) f1(l, r, K[i], K[i+j]) -#define F2(l, r, i, j) f2(l, r, K[i], K[i+j]) -#define F3(l, r, i, j) f3(l, r, K[i], K[i+j]) - -typedef BlockGetAndPut<word32, BigEndian> Block; - -void CAST128::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 t, l, r; - - /* Get inblock into l,r */ - Block::Get(inBlock)(l)(r); - /* Do the work */ - F1(l, r, 0, 16); - F2(r, l, 1, 16); - F3(l, r, 2, 16); - F1(r, l, 3, 16); - F2(l, r, 4, 16); - F3(r, l, 5, 16); - F1(l, r, 6, 16); - F2(r, l, 7, 16); - F3(l, r, 8, 16); - F1(r, l, 9, 16); - F2(l, r, 10, 16); - F3(r, l, 11, 16); - /* Only do full 16 rounds if key length > 80 bits */ - if (!reduced) { - F1(l, r, 12, 16); - F2(r, l, 13, 16); - F3(l, r, 14, 16); - F1(r, l, 15, 16); - } - /* Put l,r into outblock */ - Block::Put(xorBlock, outBlock)(r)(l); -} - -void CAST128::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 t, l, r; - - /* Get inblock into l,r */ - Block::Get(inBlock)(r)(l); - /* Only do full 16 rounds if key length > 80 bits */ - if (!reduced) { - F1(r, l, 15, 16); - F3(l, r, 14, 16); - F2(r, l, 13, 16); - F1(l, r, 12, 16); - } - F3(r, l, 11, 16); - F2(l, r, 10, 16); - F1(r, l, 9, 16); - F3(l, r, 8, 16); - F2(r, l, 7, 16); - F1(l, r, 6, 16); - F3(r, l, 5, 16); - F2(l, r, 4, 16); - F1(r, l, 3, 16); - F3(l, r, 2, 16); - F2(r, l, 1, 16); - F1(l, r, 0, 16); - /* Put l,r into outblock */ - Block::Put(xorBlock, outBlock)(l)(r); - /* Wipe clean */ - t = l = r = 0; -} - -void CAST128::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &) -{ - AssertValidKeyLength(keylength); - - reduced = (keylength <= 10); - - word32 X[4], Z[4]; - GetUserKey(BIG_ENDIAN_ORDER, X, 4, userKey, keylength); - -#define x(i) GETBYTE(X[i/4], 3-i%4) -#define z(i) GETBYTE(Z[i/4], 3-i%4) - - unsigned int i; - for (i=0; i<=16; i+=16) - { - // this part is copied directly from RFC 2144 (with some search and replace) by Wei Dai - Z[0] = X[0] ^ S[4][x(0xD)] ^ S[5][x(0xF)] ^ S[6][x(0xC)] ^ S[7][x(0xE)] ^ S[6][x(0x8)]; - Z[1] = X[2] ^ S[4][z(0x0)] ^ S[5][z(0x2)] ^ S[6][z(0x1)] ^ S[7][z(0x3)] ^ S[7][x(0xA)]; - Z[2] = X[3] ^ S[4][z(0x7)] ^ S[5][z(0x6)] ^ S[6][z(0x5)] ^ S[7][z(0x4)] ^ S[4][x(0x9)]; - Z[3] = X[1] ^ S[4][z(0xA)] ^ S[5][z(0x9)] ^ S[6][z(0xB)] ^ S[7][z(0x8)] ^ S[5][x(0xB)]; - K[i+0] = S[4][z(0x8)] ^ S[5][z(0x9)] ^ S[6][z(0x7)] ^ S[7][z(0x6)] ^ S[4][z(0x2)]; - K[i+1] = S[4][z(0xA)] ^ S[5][z(0xB)] ^ S[6][z(0x5)] ^ S[7][z(0x4)] ^ S[5][z(0x6)]; - K[i+2] = S[4][z(0xC)] ^ S[5][z(0xD)] ^ S[6][z(0x3)] ^ S[7][z(0x2)] ^ S[6][z(0x9)]; - K[i+3] = S[4][z(0xE)] ^ S[5][z(0xF)] ^ S[6][z(0x1)] ^ S[7][z(0x0)] ^ S[7][z(0xC)]; - X[0] = Z[2] ^ S[4][z(0x5)] ^ S[5][z(0x7)] ^ S[6][z(0x4)] ^ S[7][z(0x6)] ^ S[6][z(0x0)]; - X[1] = Z[0] ^ S[4][x(0x0)] ^ S[5][x(0x2)] ^ S[6][x(0x1)] ^ S[7][x(0x3)] ^ S[7][z(0x2)]; - X[2] = Z[1] ^ S[4][x(0x7)] ^ S[5][x(0x6)] ^ S[6][x(0x5)] ^ S[7][x(0x4)] ^ S[4][z(0x1)]; - X[3] = Z[3] ^ S[4][x(0xA)] ^ S[5][x(0x9)] ^ S[6][x(0xB)] ^ S[7][x(0x8)] ^ S[5][z(0x3)]; - K[i+4] = S[4][x(0x3)] ^ S[5][x(0x2)] ^ S[6][x(0xC)] ^ S[7][x(0xD)] ^ S[4][x(0x8)]; - K[i+5] = S[4][x(0x1)] ^ S[5][x(0x0)] ^ S[6][x(0xE)] ^ S[7][x(0xF)] ^ S[5][x(0xD)]; - K[i+6] = S[4][x(0x7)] ^ S[5][x(0x6)] ^ S[6][x(0x8)] ^ S[7][x(0x9)] ^ S[6][x(0x3)]; - K[i+7] = S[4][x(0x5)] ^ S[5][x(0x4)] ^ S[6][x(0xA)] ^ S[7][x(0xB)] ^ S[7][x(0x7)]; - Z[0] = X[0] ^ S[4][x(0xD)] ^ S[5][x(0xF)] ^ S[6][x(0xC)] ^ S[7][x(0xE)] ^ S[6][x(0x8)]; - Z[1] = X[2] ^ S[4][z(0x0)] ^ S[5][z(0x2)] ^ S[6][z(0x1)] ^ S[7][z(0x3)] ^ S[7][x(0xA)]; - Z[2] = X[3] ^ S[4][z(0x7)] ^ S[5][z(0x6)] ^ S[6][z(0x5)] ^ S[7][z(0x4)] ^ S[4][x(0x9)]; - Z[3] = X[1] ^ S[4][z(0xA)] ^ S[5][z(0x9)] ^ S[6][z(0xB)] ^ S[7][z(0x8)] ^ S[5][x(0xB)]; - K[i+8] = S[4][z(0x3)] ^ S[5][z(0x2)] ^ S[6][z(0xC)] ^ S[7][z(0xD)] ^ S[4][z(0x9)]; - K[i+9] = S[4][z(0x1)] ^ S[5][z(0x0)] ^ S[6][z(0xE)] ^ S[7][z(0xF)] ^ S[5][z(0xC)]; - K[i+10] = S[4][z(0x7)] ^ S[5][z(0x6)] ^ S[6][z(0x8)] ^ S[7][z(0x9)] ^ S[6][z(0x2)]; - K[i+11] = S[4][z(0x5)] ^ S[5][z(0x4)] ^ S[6][z(0xA)] ^ S[7][z(0xB)] ^ S[7][z(0x6)]; - X[0] = Z[2] ^ S[4][z(0x5)] ^ S[5][z(0x7)] ^ S[6][z(0x4)] ^ S[7][z(0x6)] ^ S[6][z(0x0)]; - X[1] = Z[0] ^ S[4][x(0x0)] ^ S[5][x(0x2)] ^ S[6][x(0x1)] ^ S[7][x(0x3)] ^ S[7][z(0x2)]; - X[2] = Z[1] ^ S[4][x(0x7)] ^ S[5][x(0x6)] ^ S[6][x(0x5)] ^ S[7][x(0x4)] ^ S[4][z(0x1)]; - X[3] = Z[3] ^ S[4][x(0xA)] ^ S[5][x(0x9)] ^ S[6][x(0xB)] ^ S[7][x(0x8)] ^ S[5][z(0x3)]; - K[i+12] = S[4][x(0x8)] ^ S[5][x(0x9)] ^ S[6][x(0x7)] ^ S[7][x(0x6)] ^ S[4][x(0x3)]; - K[i+13] = S[4][x(0xA)] ^ S[5][x(0xB)] ^ S[6][x(0x5)] ^ S[7][x(0x4)] ^ S[5][x(0x7)]; - K[i+14] = S[4][x(0xC)] ^ S[5][x(0xD)] ^ S[6][x(0x3)] ^ S[7][x(0x2)] ^ S[6][x(0x8)]; - K[i+15] = S[4][x(0xE)] ^ S[5][x(0xF)] ^ S[6][x(0x1)] ^ S[7][x(0x0)] ^ S[7][x(0xD)]; - } - - for (i=16; i<32; i++) - K[i] &= 0x1f; -} - -// The following CAST-256 implementation was contributed by Leonard Janke - -const word32 CAST256::Base::t_m[8][24]={ -{ 0x5a827999, 0xd151d6a1, 0x482133a9, 0xbef090b1, 0x35bfedb9, 0xac8f4ac1, - 0x235ea7c9, 0x9a2e04d1, 0x10fd61d9, 0x87ccbee1, 0xfe9c1be9, 0x756b78f1, - 0xec3ad5f9, 0x630a3301, 0xd9d99009, 0x50a8ed11, 0xc7784a19, 0x3e47a721, - 0xb5170429, 0x2be66131, 0xa2b5be39, 0x19851b41, 0x90547849, 0x0723d551}, -{ 0xc95c653a, 0x402bc242, 0xb6fb1f4a, 0x2dca7c52, 0xa499d95a, 0x1b693662, - 0x9238936a, 0x0907f072, 0x7fd74d7a, 0xf6a6aa82, 0x6d76078a, 0xe4456492, - 0x5b14c19a, 0xd1e41ea2, 0x48b37baa, 0xbf82d8b2, 0x365235ba, 0xad2192c2, - 0x23f0efca, 0x9ac04cd2, 0x118fa9da, 0x885f06e2, 0xff2e63ea, 0x75fdc0f2}, -{ 0x383650db, 0xaf05ade3, 0x25d50aeb, 0x9ca467f3, 0x1373c4fb, 0x8a432203, - 0x01127f0b, 0x77e1dc13, 0xeeb1391b, 0x65809623, 0xdc4ff32b, 0x531f5033, - 0xc9eead3b, 0x40be0a43, 0xb78d674b, 0x2e5cc453, 0xa52c215b, 0x1bfb7e63, - 0x92cadb6b, 0x099a3873, 0x8069957b, 0xf738f283, 0x6e084f8b, 0xe4d7ac93}, -{ 0xa7103c7c, 0x1ddf9984, 0x94aef68c, 0x0b7e5394, 0x824db09c, 0xf91d0da4, - 0x6fec6aac, 0xe6bbc7b4, 0x5d8b24bc, 0xd45a81c4, 0x4b29decc, 0xc1f93bd4, - 0x38c898dc, 0xaf97f5e4, 0x266752ec, 0x9d36aff4, 0x14060cfc, 0x8ad56a04, - 0x01a4c70c, 0x78742414, 0xef43811c, 0x6612de24, 0xdce23b2c, 0x53b19834}, -{ 0x15ea281d, 0x8cb98525, 0x0388e22d, 0x7a583f35, 0xf1279c3d, 0x67f6f945, - 0xdec6564d, 0x5595b355, 0xcc65105d, 0x43346d65, 0xba03ca6d, 0x30d32775, - 0xa7a2847d, 0x1e71e185, 0x95413e8d, 0x0c109b95, 0x82dff89d, 0xf9af55a5, - 0x707eb2ad, 0xe74e0fb5, 0x5e1d6cbd, 0xd4ecc9c5, 0x4bbc26cd, 0xc28b83d5}, -{ 0x84c413be, 0xfb9370c6, 0x7262cdce, 0xe9322ad6, 0x600187de, 0xd6d0e4e6, - 0x4da041ee, 0xc46f9ef6, 0x3b3efbfe, 0xb20e5906, 0x28ddb60e, 0x9fad1316, - 0x167c701e, 0x8d4bcd26, 0x041b2a2e, 0x7aea8736, 0xf1b9e43e, 0x68894146, - 0xdf589e4e, 0x5627fb56, 0xccf7585e, 0x43c6b566, 0xba96126e, 0x31656f76}, -{ 0xf39dff5f, 0x6a6d5c67, 0xe13cb96f, 0x580c1677, 0xcedb737f, 0x45aad087, - 0xbc7a2d8f, 0x33498a97, 0xaa18e79f, 0x20e844a7, 0x97b7a1af, 0x0e86feb7, - 0x85565bbf, 0xfc25b8c7, 0x72f515cf, 0xe9c472d7, 0x6093cfdf, 0xd7632ce7, - 0x4e3289ef, 0xc501e6f7, 0x3bd143ff, 0xb2a0a107, 0x296ffe0f, 0xa03f5b17}, -{ 0x6277eb00, 0xd9474808, 0x5016a510, 0xc6e60218, 0x3db55f20, 0xb484bc28, - 0x2b541930, 0xa2237638, 0x18f2d340, 0x8fc23048, 0x06918d50, 0x7d60ea58, - 0xf4304760, 0x6affa468, 0xe1cf0170, 0x589e5e78, 0xcf6dbb80, 0x463d1888, - 0xbd0c7590, 0x33dbd298, 0xaaab2fa0, 0x217a8ca8, 0x9849e9b0, 0x0f1946b8} -}; - -const unsigned int CAST256::Base::t_r[8][24]={ - {19, 27, 3, 11, 19, 27, 3, 11, 19, 27, 3, 11, 19, 27, 3, 11, 19, 27, 3, 11, 19, 27, 3, 11}, - {4, 12, 20, 28, 4, 12, 20, 28, 4, 12, 20, 28, 4, 12, 20, 28, 4, 12, 20, 28, 4, 12, 20, 28}, - {21, 29, 5, 13, 21, 29, 5, 13, 21, 29, 5, 13, 21, 29, 5, 13, 21, 29, 5, 13, 21, 29, 5, 13}, - {6, 14, 22, 30, 6, 14, 22, 30, 6, 14, 22, 30, 6, 14, 22, 30, 6, 14, 22, 30, 6, 14, 22, 30}, - {23, 31, 7, 15, 23, 31, 7, 15, 23, 31, 7, 15, 23, 31, 7, 15, 23, 31, 7, 15, 23, 31, 7, 15}, - {8, 16, 24, 0, 8, 16, 24, 0, 8, 16, 24, 0, 8, 16, 24, 0, 8, 16, 24, 0, 8, 16, 24, 0}, - {25, 1, 9, 17, 25, 1, 9, 17, 25, 1, 9, 17, 25, 1, 9, 17, 25, 1, 9, 17, 25, 1, 9, 17}, - {10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2, 10, 18, 26, 2} -}; - -#define Q(i) \ - F1(block[2],block[3],8*i+4,-4); \ - F2(block[1],block[2],8*i+5,-4); \ - F3(block[0],block[1],8*i+6,-4); \ - F1(block[3],block[0],8*i+7,-4); - -#define QBar(i) \ - F1(block[3],block[0],8*i+7,-4); \ - F3(block[0],block[1],8*i+6,-4); \ - F2(block[1],block[2],8*i+5,-4); \ - F1(block[2],block[3],8*i+4,-4); - -/* CAST256's encrypt/decrypt functions are identical except for the order that -the keys are used */ - -void CAST256::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 t, block[4]; - Block::Get(inBlock)(block[0])(block[1])(block[2])(block[3]); - - // Perform 6 forward quad rounds - Q(0); - Q(1); - Q(2); - Q(3); - Q(4); - Q(5); - - // Perform 6 reverse quad rounds - QBar(6); - QBar(7); - QBar(8); - QBar(9); - QBar(10); - QBar(11); - - Block::Put(xorBlock, outBlock)(block[0])(block[1])(block[2])(block[3]); -} - -/* Set up a CAST-256 key */ - -void CAST256::Base::Omega(int i, word32 kappa[8]) -{ - word32 t; - - f1(kappa[6],kappa[7],t_m[0][i],t_r[0][i]); - f2(kappa[5],kappa[6],t_m[1][i],t_r[1][i]); - f3(kappa[4],kappa[5],t_m[2][i],t_r[2][i]); - f1(kappa[3],kappa[4],t_m[3][i],t_r[3][i]); - f2(kappa[2],kappa[3],t_m[4][i],t_r[4][i]); - f3(kappa[1],kappa[2],t_m[5][i],t_r[5][i]); - f1(kappa[0],kappa[1],t_m[6][i],t_r[6][i]); - f2(kappa[7],kappa[0],t_m[7][i],t_r[7][i]); -} - -void CAST256::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &) -{ - AssertValidKeyLength(keylength); - - word32 kappa[8]; - GetUserKey(BIG_ENDIAN_ORDER, kappa, 8, userKey, keylength); - - for(int i=0; i<12; ++i) - { - Omega(2*i,kappa); - Omega(2*i+1,kappa); - - K[8*i]=kappa[0] & 31; - K[8*i+1]=kappa[2] & 31; - K[8*i+2]=kappa[4] & 31; - K[8*i+3]=kappa[6] & 31; - K[8*i+4]=kappa[7]; - K[8*i+5]=kappa[5]; - K[8*i+6]=kappa[3]; - K[8*i+7]=kappa[1]; - } - - if (!IsForwardTransformation()) - { - for(int j=0; j<6; ++j) - { - for(int i=0; i<4; ++i) - { - int i1=8*j+i; - int i2=8*(11-j)+i; - - assert(i1<i2); - - std::swap(K[i1],K[i2]); - std::swap(K[i1+4],K[i2+4]); - } - } - } - - memset(kappa, 0, sizeof(kappa)); -} - -NAMESPACE_END diff --git a/CryptoPP/cast.h b/CryptoPP/cast.h deleted file mode 100644 index 98bb5d6b1..000000000 --- a/CryptoPP/cast.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef CRYPTOPP_CAST_H -#define CRYPTOPP_CAST_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -class CAST -{ -protected: - static const word32 S[8][256]; -}; - -//! algorithm info -struct CAST128_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 5, 16> -{ - static const char *StaticAlgorithmName() {return "CAST-128";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#CAST-128">CAST-128</a> -class CAST128 : public CAST128_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherImpl<CAST128_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - bool reduced; - FixedSizeSecBlock<word32, 32> K; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -//! algorithm info -struct CAST256_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 32> -{ - static const char *StaticAlgorithmName() {return "CAST-256";} -}; - -//! <a href="http://www.weidai.com/scan-mirror/cs.html#CAST-256">CAST-256</a> -class CAST256 : public CAST256_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public CAST, public BlockCipherImpl<CAST256_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - - protected: - static const word32 t_m[8][24]; - static const unsigned int t_r[8][24]; - - static void Omega(int i, word32 kappa[8]); - - FixedSizeSecBlock<word32, 8*12> K; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Base> Encryption; - typedef BlockCipherFinal<DECRYPTION, Base> Decryption; -}; - -typedef CAST128::Encryption CAST128Encryption; -typedef CAST128::Decryption CAST128Decryption; - -typedef CAST256::Encryption CAST256Encryption; -typedef CAST256::Decryption CAST256Decryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/casts.cpp b/CryptoPP/casts.cpp deleted file mode 100644 index 16fa2b13f..000000000 --- a/CryptoPP/casts.cpp +++ /dev/null @@ -1,545 +0,0 @@ -#include "pch.h" -#include "cast.h" - -NAMESPACE_BEGIN(CryptoPP) - -// CAST S-boxes - -const word32 CAST::S[8][256] = { -{ - 0x30FB40D4UL, 0x9FA0FF0BUL, 0x6BECCD2FUL, 0x3F258C7AUL, - 0x1E213F2FUL, 0x9C004DD3UL, 0x6003E540UL, 0xCF9FC949UL, - 0xBFD4AF27UL, 0x88BBBDB5UL, 0xE2034090UL, 0x98D09675UL, - 0x6E63A0E0UL, 0x15C361D2UL, 0xC2E7661DUL, 0x22D4FF8EUL, - 0x28683B6FUL, 0xC07FD059UL, 0xFF2379C8UL, 0x775F50E2UL, - 0x43C340D3UL, 0xDF2F8656UL, 0x887CA41AUL, 0xA2D2BD2DUL, - 0xA1C9E0D6UL, 0x346C4819UL, 0x61B76D87UL, 0x22540F2FUL, - 0x2ABE32E1UL, 0xAA54166BUL, 0x22568E3AUL, 0xA2D341D0UL, - 0x66DB40C8UL, 0xA784392FUL, 0x004DFF2FUL, 0x2DB9D2DEUL, - 0x97943FACUL, 0x4A97C1D8UL, 0x527644B7UL, 0xB5F437A7UL, - 0xB82CBAEFUL, 0xD751D159UL, 0x6FF7F0EDUL, 0x5A097A1FUL, - 0x827B68D0UL, 0x90ECF52EUL, 0x22B0C054UL, 0xBC8E5935UL, - 0x4B6D2F7FUL, 0x50BB64A2UL, 0xD2664910UL, 0xBEE5812DUL, - 0xB7332290UL, 0xE93B159FUL, 0xB48EE411UL, 0x4BFF345DUL, - 0xFD45C240UL, 0xAD31973FUL, 0xC4F6D02EUL, 0x55FC8165UL, - 0xD5B1CAADUL, 0xA1AC2DAEUL, 0xA2D4B76DUL, 0xC19B0C50UL, - 0x882240F2UL, 0x0C6E4F38UL, 0xA4E4BFD7UL, 0x4F5BA272UL, - 0x564C1D2FUL, 0xC59C5319UL, 0xB949E354UL, 0xB04669FEUL, - 0xB1B6AB8AUL, 0xC71358DDUL, 0x6385C545UL, 0x110F935DUL, - 0x57538AD5UL, 0x6A390493UL, 0xE63D37E0UL, 0x2A54F6B3UL, - 0x3A787D5FUL, 0x6276A0B5UL, 0x19A6FCDFUL, 0x7A42206AUL, - 0x29F9D4D5UL, 0xF61B1891UL, 0xBB72275EUL, 0xAA508167UL, - 0x38901091UL, 0xC6B505EBUL, 0x84C7CB8CUL, 0x2AD75A0FUL, - 0x874A1427UL, 0xA2D1936BUL, 0x2AD286AFUL, 0xAA56D291UL, - 0xD7894360UL, 0x425C750DUL, 0x93B39E26UL, 0x187184C9UL, - 0x6C00B32DUL, 0x73E2BB14UL, 0xA0BEBC3CUL, 0x54623779UL, - 0x64459EABUL, 0x3F328B82UL, 0x7718CF82UL, 0x59A2CEA6UL, - 0x04EE002EUL, 0x89FE78E6UL, 0x3FAB0950UL, 0x325FF6C2UL, - 0x81383F05UL, 0x6963C5C8UL, 0x76CB5AD6UL, 0xD49974C9UL, - 0xCA180DCFUL, 0x380782D5UL, 0xC7FA5CF6UL, 0x8AC31511UL, - 0x35E79E13UL, 0x47DA91D0UL, 0xF40F9086UL, 0xA7E2419EUL, - 0x31366241UL, 0x051EF495UL, 0xAA573B04UL, 0x4A805D8DUL, - 0x548300D0UL, 0x00322A3CUL, 0xBF64CDDFUL, 0xBA57A68EUL, - 0x75C6372BUL, 0x50AFD341UL, 0xA7C13275UL, 0x915A0BF5UL, - 0x6B54BFABUL, 0x2B0B1426UL, 0xAB4CC9D7UL, 0x449CCD82UL, - 0xF7FBF265UL, 0xAB85C5F3UL, 0x1B55DB94UL, 0xAAD4E324UL, - 0xCFA4BD3FUL, 0x2DEAA3E2UL, 0x9E204D02UL, 0xC8BD25ACUL, - 0xEADF55B3UL, 0xD5BD9E98UL, 0xE31231B2UL, 0x2AD5AD6CUL, - 0x954329DEUL, 0xADBE4528UL, 0xD8710F69UL, 0xAA51C90FUL, - 0xAA786BF6UL, 0x22513F1EUL, 0xAA51A79BUL, 0x2AD344CCUL, - 0x7B5A41F0UL, 0xD37CFBADUL, 0x1B069505UL, 0x41ECE491UL, - 0xB4C332E6UL, 0x032268D4UL, 0xC9600ACCUL, 0xCE387E6DUL, - 0xBF6BB16CUL, 0x6A70FB78UL, 0x0D03D9C9UL, 0xD4DF39DEUL, - 0xE01063DAUL, 0x4736F464UL, 0x5AD328D8UL, 0xB347CC96UL, - 0x75BB0FC3UL, 0x98511BFBUL, 0x4FFBCC35UL, 0xB58BCF6AUL, - 0xE11F0ABCUL, 0xBFC5FE4AUL, 0xA70AEC10UL, 0xAC39570AUL, - 0x3F04442FUL, 0x6188B153UL, 0xE0397A2EUL, 0x5727CB79UL, - 0x9CEB418FUL, 0x1CACD68DUL, 0x2AD37C96UL, 0x0175CB9DUL, - 0xC69DFF09UL, 0xC75B65F0UL, 0xD9DB40D8UL, 0xEC0E7779UL, - 0x4744EAD4UL, 0xB11C3274UL, 0xDD24CB9EUL, 0x7E1C54BDUL, - 0xF01144F9UL, 0xD2240EB1UL, 0x9675B3FDUL, 0xA3AC3755UL, - 0xD47C27AFUL, 0x51C85F4DUL, 0x56907596UL, 0xA5BB15E6UL, - 0x580304F0UL, 0xCA042CF1UL, 0x011A37EAUL, 0x8DBFAADBUL, - 0x35BA3E4AUL, 0x3526FFA0UL, 0xC37B4D09UL, 0xBC306ED9UL, - 0x98A52666UL, 0x5648F725UL, 0xFF5E569DUL, 0x0CED63D0UL, - 0x7C63B2CFUL, 0x700B45E1UL, 0xD5EA50F1UL, 0x85A92872UL, - 0xAF1FBDA7UL, 0xD4234870UL, 0xA7870BF3UL, 0x2D3B4D79UL, - 0x42E04198UL, 0x0CD0EDE7UL, 0x26470DB8UL, 0xF881814CUL, - 0x474D6AD7UL, 0x7C0C5E5CUL, 0xD1231959UL, 0x381B7298UL, - 0xF5D2F4DBUL, 0xAB838653UL, 0x6E2F1E23UL, 0x83719C9EUL, - 0xBD91E046UL, 0x9A56456EUL, 0xDC39200CUL, 0x20C8C571UL, - 0x962BDA1CUL, 0xE1E696FFUL, 0xB141AB08UL, 0x7CCA89B9UL, - 0x1A69E783UL, 0x02CC4843UL, 0xA2F7C579UL, 0x429EF47DUL, - 0x427B169CUL, 0x5AC9F049UL, 0xDD8F0F00UL, 0x5C8165BFUL -}, - -{ - 0x1F201094UL, 0xEF0BA75BUL, 0x69E3CF7EUL, 0x393F4380UL, - 0xFE61CF7AUL, 0xEEC5207AUL, 0x55889C94UL, 0x72FC0651UL, - 0xADA7EF79UL, 0x4E1D7235UL, 0xD55A63CEUL, 0xDE0436BAUL, - 0x99C430EFUL, 0x5F0C0794UL, 0x18DCDB7DUL, 0xA1D6EFF3UL, - 0xA0B52F7BUL, 0x59E83605UL, 0xEE15B094UL, 0xE9FFD909UL, - 0xDC440086UL, 0xEF944459UL, 0xBA83CCB3UL, 0xE0C3CDFBUL, - 0xD1DA4181UL, 0x3B092AB1UL, 0xF997F1C1UL, 0xA5E6CF7BUL, - 0x01420DDBUL, 0xE4E7EF5BUL, 0x25A1FF41UL, 0xE180F806UL, - 0x1FC41080UL, 0x179BEE7AUL, 0xD37AC6A9UL, 0xFE5830A4UL, - 0x98DE8B7FUL, 0x77E83F4EUL, 0x79929269UL, 0x24FA9F7BUL, - 0xE113C85BUL, 0xACC40083UL, 0xD7503525UL, 0xF7EA615FUL, - 0x62143154UL, 0x0D554B63UL, 0x5D681121UL, 0xC866C359UL, - 0x3D63CF73UL, 0xCEE234C0UL, 0xD4D87E87UL, 0x5C672B21UL, - 0x071F6181UL, 0x39F7627FUL, 0x361E3084UL, 0xE4EB573BUL, - 0x602F64A4UL, 0xD63ACD9CUL, 0x1BBC4635UL, 0x9E81032DUL, - 0x2701F50CUL, 0x99847AB4UL, 0xA0E3DF79UL, 0xBA6CF38CUL, - 0x10843094UL, 0x2537A95EUL, 0xF46F6FFEUL, 0xA1FF3B1FUL, - 0x208CFB6AUL, 0x8F458C74UL, 0xD9E0A227UL, 0x4EC73A34UL, - 0xFC884F69UL, 0x3E4DE8DFUL, 0xEF0E0088UL, 0x3559648DUL, - 0x8A45388CUL, 0x1D804366UL, 0x721D9BFDUL, 0xA58684BBUL, - 0xE8256333UL, 0x844E8212UL, 0x128D8098UL, 0xFED33FB4UL, - 0xCE280AE1UL, 0x27E19BA5UL, 0xD5A6C252UL, 0xE49754BDUL, - 0xC5D655DDUL, 0xEB667064UL, 0x77840B4DUL, 0xA1B6A801UL, - 0x84DB26A9UL, 0xE0B56714UL, 0x21F043B7UL, 0xE5D05860UL, - 0x54F03084UL, 0x066FF472UL, 0xA31AA153UL, 0xDADC4755UL, - 0xB5625DBFUL, 0x68561BE6UL, 0x83CA6B94UL, 0x2D6ED23BUL, - 0xECCF01DBUL, 0xA6D3D0BAUL, 0xB6803D5CUL, 0xAF77A709UL, - 0x33B4A34CUL, 0x397BC8D6UL, 0x5EE22B95UL, 0x5F0E5304UL, - 0x81ED6F61UL, 0x20E74364UL, 0xB45E1378UL, 0xDE18639BUL, - 0x881CA122UL, 0xB96726D1UL, 0x8049A7E8UL, 0x22B7DA7BUL, - 0x5E552D25UL, 0x5272D237UL, 0x79D2951CUL, 0xC60D894CUL, - 0x488CB402UL, 0x1BA4FE5BUL, 0xA4B09F6BUL, 0x1CA815CFUL, - 0xA20C3005UL, 0x8871DF63UL, 0xB9DE2FCBUL, 0x0CC6C9E9UL, - 0x0BEEFF53UL, 0xE3214517UL, 0xB4542835UL, 0x9F63293CUL, - 0xEE41E729UL, 0x6E1D2D7CUL, 0x50045286UL, 0x1E6685F3UL, - 0xF33401C6UL, 0x30A22C95UL, 0x31A70850UL, 0x60930F13UL, - 0x73F98417UL, 0xA1269859UL, 0xEC645C44UL, 0x52C877A9UL, - 0xCDFF33A6UL, 0xA02B1741UL, 0x7CBAD9A2UL, 0x2180036FUL, - 0x50D99C08UL, 0xCB3F4861UL, 0xC26BD765UL, 0x64A3F6ABUL, - 0x80342676UL, 0x25A75E7BUL, 0xE4E6D1FCUL, 0x20C710E6UL, - 0xCDF0B680UL, 0x17844D3BUL, 0x31EEF84DUL, 0x7E0824E4UL, - 0x2CCB49EBUL, 0x846A3BAEUL, 0x8FF77888UL, 0xEE5D60F6UL, - 0x7AF75673UL, 0x2FDD5CDBUL, 0xA11631C1UL, 0x30F66F43UL, - 0xB3FAEC54UL, 0x157FD7FAUL, 0xEF8579CCUL, 0xD152DE58UL, - 0xDB2FFD5EUL, 0x8F32CE19UL, 0x306AF97AUL, 0x02F03EF8UL, - 0x99319AD5UL, 0xC242FA0FUL, 0xA7E3EBB0UL, 0xC68E4906UL, - 0xB8DA230CUL, 0x80823028UL, 0xDCDEF3C8UL, 0xD35FB171UL, - 0x088A1BC8UL, 0xBEC0C560UL, 0x61A3C9E8UL, 0xBCA8F54DUL, - 0xC72FEFFAUL, 0x22822E99UL, 0x82C570B4UL, 0xD8D94E89UL, - 0x8B1C34BCUL, 0x301E16E6UL, 0x273BE979UL, 0xB0FFEAA6UL, - 0x61D9B8C6UL, 0x00B24869UL, 0xB7FFCE3FUL, 0x08DC283BUL, - 0x43DAF65AUL, 0xF7E19798UL, 0x7619B72FUL, 0x8F1C9BA4UL, - 0xDC8637A0UL, 0x16A7D3B1UL, 0x9FC393B7UL, 0xA7136EEBUL, - 0xC6BCC63EUL, 0x1A513742UL, 0xEF6828BCUL, 0x520365D6UL, - 0x2D6A77ABUL, 0x3527ED4BUL, 0x821FD216UL, 0x095C6E2EUL, - 0xDB92F2FBUL, 0x5EEA29CBUL, 0x145892F5UL, 0x91584F7FUL, - 0x5483697BUL, 0x2667A8CCUL, 0x85196048UL, 0x8C4BACEAUL, - 0x833860D4UL, 0x0D23E0F9UL, 0x6C387E8AUL, 0x0AE6D249UL, - 0xB284600CUL, 0xD835731DUL, 0xDCB1C647UL, 0xAC4C56EAUL, - 0x3EBD81B3UL, 0x230EABB0UL, 0x6438BC87UL, 0xF0B5B1FAUL, - 0x8F5EA2B3UL, 0xFC184642UL, 0x0A036B7AUL, 0x4FB089BDUL, - 0x649DA589UL, 0xA345415EUL, 0x5C038323UL, 0x3E5D3BB9UL, - 0x43D79572UL, 0x7E6DD07CUL, 0x06DFDF1EUL, 0x6C6CC4EFUL, - 0x7160A539UL, 0x73BFBE70UL, 0x83877605UL, 0x4523ECF1UL -}, - -{ - 0x8DEFC240UL, 0x25FA5D9FUL, 0xEB903DBFUL, 0xE810C907UL, - 0x47607FFFUL, 0x369FE44BUL, 0x8C1FC644UL, 0xAECECA90UL, - 0xBEB1F9BFUL, 0xEEFBCAEAUL, 0xE8CF1950UL, 0x51DF07AEUL, - 0x920E8806UL, 0xF0AD0548UL, 0xE13C8D83UL, 0x927010D5UL, - 0x11107D9FUL, 0x07647DB9UL, 0xB2E3E4D4UL, 0x3D4F285EUL, - 0xB9AFA820UL, 0xFADE82E0UL, 0xA067268BUL, 0x8272792EUL, - 0x553FB2C0UL, 0x489AE22BUL, 0xD4EF9794UL, 0x125E3FBCUL, - 0x21FFFCEEUL, 0x825B1BFDUL, 0x9255C5EDUL, 0x1257A240UL, - 0x4E1A8302UL, 0xBAE07FFFUL, 0x528246E7UL, 0x8E57140EUL, - 0x3373F7BFUL, 0x8C9F8188UL, 0xA6FC4EE8UL, 0xC982B5A5UL, - 0xA8C01DB7UL, 0x579FC264UL, 0x67094F31UL, 0xF2BD3F5FUL, - 0x40FFF7C1UL, 0x1FB78DFCUL, 0x8E6BD2C1UL, 0x437BE59BUL, - 0x99B03DBFUL, 0xB5DBC64BUL, 0x638DC0E6UL, 0x55819D99UL, - 0xA197C81CUL, 0x4A012D6EUL, 0xC5884A28UL, 0xCCC36F71UL, - 0xB843C213UL, 0x6C0743F1UL, 0x8309893CUL, 0x0FEDDD5FUL, - 0x2F7FE850UL, 0xD7C07F7EUL, 0x02507FBFUL, 0x5AFB9A04UL, - 0xA747D2D0UL, 0x1651192EUL, 0xAF70BF3EUL, 0x58C31380UL, - 0x5F98302EUL, 0x727CC3C4UL, 0x0A0FB402UL, 0x0F7FEF82UL, - 0x8C96FDADUL, 0x5D2C2AAEUL, 0x8EE99A49UL, 0x50DA88B8UL, - 0x8427F4A0UL, 0x1EAC5790UL, 0x796FB449UL, 0x8252DC15UL, - 0xEFBD7D9BUL, 0xA672597DUL, 0xADA840D8UL, 0x45F54504UL, - 0xFA5D7403UL, 0xE83EC305UL, 0x4F91751AUL, 0x925669C2UL, - 0x23EFE941UL, 0xA903F12EUL, 0x60270DF2UL, 0x0276E4B6UL, - 0x94FD6574UL, 0x927985B2UL, 0x8276DBCBUL, 0x02778176UL, - 0xF8AF918DUL, 0x4E48F79EUL, 0x8F616DDFUL, 0xE29D840EUL, - 0x842F7D83UL, 0x340CE5C8UL, 0x96BBB682UL, 0x93B4B148UL, - 0xEF303CABUL, 0x984FAF28UL, 0x779FAF9BUL, 0x92DC560DUL, - 0x224D1E20UL, 0x8437AA88UL, 0x7D29DC96UL, 0x2756D3DCUL, - 0x8B907CEEUL, 0xB51FD240UL, 0xE7C07CE3UL, 0xE566B4A1UL, - 0xC3E9615EUL, 0x3CF8209DUL, 0x6094D1E3UL, 0xCD9CA341UL, - 0x5C76460EUL, 0x00EA983BUL, 0xD4D67881UL, 0xFD47572CUL, - 0xF76CEDD9UL, 0xBDA8229CUL, 0x127DADAAUL, 0x438A074EUL, - 0x1F97C090UL, 0x081BDB8AUL, 0x93A07EBEUL, 0xB938CA15UL, - 0x97B03CFFUL, 0x3DC2C0F8UL, 0x8D1AB2ECUL, 0x64380E51UL, - 0x68CC7BFBUL, 0xD90F2788UL, 0x12490181UL, 0x5DE5FFD4UL, - 0xDD7EF86AUL, 0x76A2E214UL, 0xB9A40368UL, 0x925D958FUL, - 0x4B39FFFAUL, 0xBA39AEE9UL, 0xA4FFD30BUL, 0xFAF7933BUL, - 0x6D498623UL, 0x193CBCFAUL, 0x27627545UL, 0x825CF47AUL, - 0x61BD8BA0UL, 0xD11E42D1UL, 0xCEAD04F4UL, 0x127EA392UL, - 0x10428DB7UL, 0x8272A972UL, 0x9270C4A8UL, 0x127DE50BUL, - 0x285BA1C8UL, 0x3C62F44FUL, 0x35C0EAA5UL, 0xE805D231UL, - 0x428929FBUL, 0xB4FCDF82UL, 0x4FB66A53UL, 0x0E7DC15BUL, - 0x1F081FABUL, 0x108618AEUL, 0xFCFD086DUL, 0xF9FF2889UL, - 0x694BCC11UL, 0x236A5CAEUL, 0x12DECA4DUL, 0x2C3F8CC5UL, - 0xD2D02DFEUL, 0xF8EF5896UL, 0xE4CF52DAUL, 0x95155B67UL, - 0x494A488CUL, 0xB9B6A80CUL, 0x5C8F82BCUL, 0x89D36B45UL, - 0x3A609437UL, 0xEC00C9A9UL, 0x44715253UL, 0x0A874B49UL, - 0xD773BC40UL, 0x7C34671CUL, 0x02717EF6UL, 0x4FEB5536UL, - 0xA2D02FFFUL, 0xD2BF60C4UL, 0xD43F03C0UL, 0x50B4EF6DUL, - 0x07478CD1UL, 0x006E1888UL, 0xA2E53F55UL, 0xB9E6D4BCUL, - 0xA2048016UL, 0x97573833UL, 0xD7207D67UL, 0xDE0F8F3DUL, - 0x72F87B33UL, 0xABCC4F33UL, 0x7688C55DUL, 0x7B00A6B0UL, - 0x947B0001UL, 0x570075D2UL, 0xF9BB88F8UL, 0x8942019EUL, - 0x4264A5FFUL, 0x856302E0UL, 0x72DBD92BUL, 0xEE971B69UL, - 0x6EA22FDEUL, 0x5F08AE2BUL, 0xAF7A616DUL, 0xE5C98767UL, - 0xCF1FEBD2UL, 0x61EFC8C2UL, 0xF1AC2571UL, 0xCC8239C2UL, - 0x67214CB8UL, 0xB1E583D1UL, 0xB7DC3E62UL, 0x7F10BDCEUL, - 0xF90A5C38UL, 0x0FF0443DUL, 0x606E6DC6UL, 0x60543A49UL, - 0x5727C148UL, 0x2BE98A1DUL, 0x8AB41738UL, 0x20E1BE24UL, - 0xAF96DA0FUL, 0x68458425UL, 0x99833BE5UL, 0x600D457DUL, - 0x282F9350UL, 0x8334B362UL, 0xD91D1120UL, 0x2B6D8DA0UL, - 0x642B1E31UL, 0x9C305A00UL, 0x52BCE688UL, 0x1B03588AUL, - 0xF7BAEFD5UL, 0x4142ED9CUL, 0xA4315C11UL, 0x83323EC5UL, - 0xDFEF4636UL, 0xA133C501UL, 0xE9D3531CUL, 0xEE353783UL -}, - -{ - 0x9DB30420UL, 0x1FB6E9DEUL, 0xA7BE7BEFUL, 0xD273A298UL, - 0x4A4F7BDBUL, 0x64AD8C57UL, 0x85510443UL, 0xFA020ED1UL, - 0x7E287AFFUL, 0xE60FB663UL, 0x095F35A1UL, 0x79EBF120UL, - 0xFD059D43UL, 0x6497B7B1UL, 0xF3641F63UL, 0x241E4ADFUL, - 0x28147F5FUL, 0x4FA2B8CDUL, 0xC9430040UL, 0x0CC32220UL, - 0xFDD30B30UL, 0xC0A5374FUL, 0x1D2D00D9UL, 0x24147B15UL, - 0xEE4D111AUL, 0x0FCA5167UL, 0x71FF904CUL, 0x2D195FFEUL, - 0x1A05645FUL, 0x0C13FEFEUL, 0x081B08CAUL, 0x05170121UL, - 0x80530100UL, 0xE83E5EFEUL, 0xAC9AF4F8UL, 0x7FE72701UL, - 0xD2B8EE5FUL, 0x06DF4261UL, 0xBB9E9B8AUL, 0x7293EA25UL, - 0xCE84FFDFUL, 0xF5718801UL, 0x3DD64B04UL, 0xA26F263BUL, - 0x7ED48400UL, 0x547EEBE6UL, 0x446D4CA0UL, 0x6CF3D6F5UL, - 0x2649ABDFUL, 0xAEA0C7F5UL, 0x36338CC1UL, 0x503F7E93UL, - 0xD3772061UL, 0x11B638E1UL, 0x72500E03UL, 0xF80EB2BBUL, - 0xABE0502EUL, 0xEC8D77DEUL, 0x57971E81UL, 0xE14F6746UL, - 0xC9335400UL, 0x6920318FUL, 0x081DBB99UL, 0xFFC304A5UL, - 0x4D351805UL, 0x7F3D5CE3UL, 0xA6C866C6UL, 0x5D5BCCA9UL, - 0xDAEC6FEAUL, 0x9F926F91UL, 0x9F46222FUL, 0x3991467DUL, - 0xA5BF6D8EUL, 0x1143C44FUL, 0x43958302UL, 0xD0214EEBUL, - 0x022083B8UL, 0x3FB6180CUL, 0x18F8931EUL, 0x281658E6UL, - 0x26486E3EUL, 0x8BD78A70UL, 0x7477E4C1UL, 0xB506E07CUL, - 0xF32D0A25UL, 0x79098B02UL, 0xE4EABB81UL, 0x28123B23UL, - 0x69DEAD38UL, 0x1574CA16UL, 0xDF871B62UL, 0x211C40B7UL, - 0xA51A9EF9UL, 0x0014377BUL, 0x041E8AC8UL, 0x09114003UL, - 0xBD59E4D2UL, 0xE3D156D5UL, 0x4FE876D5UL, 0x2F91A340UL, - 0x557BE8DEUL, 0x00EAE4A7UL, 0x0CE5C2ECUL, 0x4DB4BBA6UL, - 0xE756BDFFUL, 0xDD3369ACUL, 0xEC17B035UL, 0x06572327UL, - 0x99AFC8B0UL, 0x56C8C391UL, 0x6B65811CUL, 0x5E146119UL, - 0x6E85CB75UL, 0xBE07C002UL, 0xC2325577UL, 0x893FF4ECUL, - 0x5BBFC92DUL, 0xD0EC3B25UL, 0xB7801AB7UL, 0x8D6D3B24UL, - 0x20C763EFUL, 0xC366A5FCUL, 0x9C382880UL, 0x0ACE3205UL, - 0xAAC9548AUL, 0xECA1D7C7UL, 0x041AFA32UL, 0x1D16625AUL, - 0x6701902CUL, 0x9B757A54UL, 0x31D477F7UL, 0x9126B031UL, - 0x36CC6FDBUL, 0xC70B8B46UL, 0xD9E66A48UL, 0x56E55A79UL, - 0x026A4CEBUL, 0x52437EFFUL, 0x2F8F76B4UL, 0x0DF980A5UL, - 0x8674CDE3UL, 0xEDDA04EBUL, 0x17A9BE04UL, 0x2C18F4DFUL, - 0xB7747F9DUL, 0xAB2AF7B4UL, 0xEFC34D20UL, 0x2E096B7CUL, - 0x1741A254UL, 0xE5B6A035UL, 0x213D42F6UL, 0x2C1C7C26UL, - 0x61C2F50FUL, 0x6552DAF9UL, 0xD2C231F8UL, 0x25130F69UL, - 0xD8167FA2UL, 0x0418F2C8UL, 0x001A96A6UL, 0x0D1526ABUL, - 0x63315C21UL, 0x5E0A72ECUL, 0x49BAFEFDUL, 0x187908D9UL, - 0x8D0DBD86UL, 0x311170A7UL, 0x3E9B640CUL, 0xCC3E10D7UL, - 0xD5CAD3B6UL, 0x0CAEC388UL, 0xF73001E1UL, 0x6C728AFFUL, - 0x71EAE2A1UL, 0x1F9AF36EUL, 0xCFCBD12FUL, 0xC1DE8417UL, - 0xAC07BE6BUL, 0xCB44A1D8UL, 0x8B9B0F56UL, 0x013988C3UL, - 0xB1C52FCAUL, 0xB4BE31CDUL, 0xD8782806UL, 0x12A3A4E2UL, - 0x6F7DE532UL, 0x58FD7EB6UL, 0xD01EE900UL, 0x24ADFFC2UL, - 0xF4990FC5UL, 0x9711AAC5UL, 0x001D7B95UL, 0x82E5E7D2UL, - 0x109873F6UL, 0x00613096UL, 0xC32D9521UL, 0xADA121FFUL, - 0x29908415UL, 0x7FBB977FUL, 0xAF9EB3DBUL, 0x29C9ED2AUL, - 0x5CE2A465UL, 0xA730F32CUL, 0xD0AA3FE8UL, 0x8A5CC091UL, - 0xD49E2CE7UL, 0x0CE454A9UL, 0xD60ACD86UL, 0x015F1919UL, - 0x77079103UL, 0xDEA03AF6UL, 0x78A8565EUL, 0xDEE356DFUL, - 0x21F05CBEUL, 0x8B75E387UL, 0xB3C50651UL, 0xB8A5C3EFUL, - 0xD8EEB6D2UL, 0xE523BE77UL, 0xC2154529UL, 0x2F69EFDFUL, - 0xAFE67AFBUL, 0xF470C4B2UL, 0xF3E0EB5BUL, 0xD6CC9876UL, - 0x39E4460CUL, 0x1FDA8538UL, 0x1987832FUL, 0xCA007367UL, - 0xA99144F8UL, 0x296B299EUL, 0x492FC295UL, 0x9266BEABUL, - 0xB5676E69UL, 0x9BD3DDDAUL, 0xDF7E052FUL, 0xDB25701CUL, - 0x1B5E51EEUL, 0xF65324E6UL, 0x6AFCE36CUL, 0x0316CC04UL, - 0x8644213EUL, 0xB7DC59D0UL, 0x7965291FUL, 0xCCD6FD43UL, - 0x41823979UL, 0x932BCDF6UL, 0xB657C34DUL, 0x4EDFD282UL, - 0x7AE5290CUL, 0x3CB9536BUL, 0x851E20FEUL, 0x9833557EUL, - 0x13ECF0B0UL, 0xD3FFB372UL, 0x3F85C5C1UL, 0x0AEF7ED2UL -}, - -{ - 0x7EC90C04UL, 0x2C6E74B9UL, 0x9B0E66DFUL, 0xA6337911UL, - 0xB86A7FFFUL, 0x1DD358F5UL, 0x44DD9D44UL, 0x1731167FUL, - 0x08FBF1FAUL, 0xE7F511CCUL, 0xD2051B00UL, 0x735ABA00UL, - 0x2AB722D8UL, 0x386381CBUL, 0xACF6243AUL, 0x69BEFD7AUL, - 0xE6A2E77FUL, 0xF0C720CDUL, 0xC4494816UL, 0xCCF5C180UL, - 0x38851640UL, 0x15B0A848UL, 0xE68B18CBUL, 0x4CAADEFFUL, - 0x5F480A01UL, 0x0412B2AAUL, 0x259814FCUL, 0x41D0EFE2UL, - 0x4E40B48DUL, 0x248EB6FBUL, 0x8DBA1CFEUL, 0x41A99B02UL, - 0x1A550A04UL, 0xBA8F65CBUL, 0x7251F4E7UL, 0x95A51725UL, - 0xC106ECD7UL, 0x97A5980AUL, 0xC539B9AAUL, 0x4D79FE6AUL, - 0xF2F3F763UL, 0x68AF8040UL, 0xED0C9E56UL, 0x11B4958BUL, - 0xE1EB5A88UL, 0x8709E6B0UL, 0xD7E07156UL, 0x4E29FEA7UL, - 0x6366E52DUL, 0x02D1C000UL, 0xC4AC8E05UL, 0x9377F571UL, - 0x0C05372AUL, 0x578535F2UL, 0x2261BE02UL, 0xD642A0C9UL, - 0xDF13A280UL, 0x74B55BD2UL, 0x682199C0UL, 0xD421E5ECUL, - 0x53FB3CE8UL, 0xC8ADEDB3UL, 0x28A87FC9UL, 0x3D959981UL, - 0x5C1FF900UL, 0xFE38D399UL, 0x0C4EFF0BUL, 0x062407EAUL, - 0xAA2F4FB1UL, 0x4FB96976UL, 0x90C79505UL, 0xB0A8A774UL, - 0xEF55A1FFUL, 0xE59CA2C2UL, 0xA6B62D27UL, 0xE66A4263UL, - 0xDF65001FUL, 0x0EC50966UL, 0xDFDD55BCUL, 0x29DE0655UL, - 0x911E739AUL, 0x17AF8975UL, 0x32C7911CUL, 0x89F89468UL, - 0x0D01E980UL, 0x524755F4UL, 0x03B63CC9UL, 0x0CC844B2UL, - 0xBCF3F0AAUL, 0x87AC36E9UL, 0xE53A7426UL, 0x01B3D82BUL, - 0x1A9E7449UL, 0x64EE2D7EUL, 0xCDDBB1DAUL, 0x01C94910UL, - 0xB868BF80UL, 0x0D26F3FDUL, 0x9342EDE7UL, 0x04A5C284UL, - 0x636737B6UL, 0x50F5B616UL, 0xF24766E3UL, 0x8ECA36C1UL, - 0x136E05DBUL, 0xFEF18391UL, 0xFB887A37UL, 0xD6E7F7D4UL, - 0xC7FB7DC9UL, 0x3063FCDFUL, 0xB6F589DEUL, 0xEC2941DAUL, - 0x26E46695UL, 0xB7566419UL, 0xF654EFC5UL, 0xD08D58B7UL, - 0x48925401UL, 0xC1BACB7FUL, 0xE5FF550FUL, 0xB6083049UL, - 0x5BB5D0E8UL, 0x87D72E5AUL, 0xAB6A6EE1UL, 0x223A66CEUL, - 0xC62BF3CDUL, 0x9E0885F9UL, 0x68CB3E47UL, 0x086C010FUL, - 0xA21DE820UL, 0xD18B69DEUL, 0xF3F65777UL, 0xFA02C3F6UL, - 0x407EDAC3UL, 0xCBB3D550UL, 0x1793084DUL, 0xB0D70EBAUL, - 0x0AB378D5UL, 0xD951FB0CUL, 0xDED7DA56UL, 0x4124BBE4UL, - 0x94CA0B56UL, 0x0F5755D1UL, 0xE0E1E56EUL, 0x6184B5BEUL, - 0x580A249FUL, 0x94F74BC0UL, 0xE327888EUL, 0x9F7B5561UL, - 0xC3DC0280UL, 0x05687715UL, 0x646C6BD7UL, 0x44904DB3UL, - 0x66B4F0A3UL, 0xC0F1648AUL, 0x697ED5AFUL, 0x49E92FF6UL, - 0x309E374FUL, 0x2CB6356AUL, 0x85808573UL, 0x4991F840UL, - 0x76F0AE02UL, 0x083BE84DUL, 0x28421C9AUL, 0x44489406UL, - 0x736E4CB8UL, 0xC1092910UL, 0x8BC95FC6UL, 0x7D869CF4UL, - 0x134F616FUL, 0x2E77118DUL, 0xB31B2BE1UL, 0xAA90B472UL, - 0x3CA5D717UL, 0x7D161BBAUL, 0x9CAD9010UL, 0xAF462BA2UL, - 0x9FE459D2UL, 0x45D34559UL, 0xD9F2DA13UL, 0xDBC65487UL, - 0xF3E4F94EUL, 0x176D486FUL, 0x097C13EAUL, 0x631DA5C7UL, - 0x445F7382UL, 0x175683F4UL, 0xCDC66A97UL, 0x70BE0288UL, - 0xB3CDCF72UL, 0x6E5DD2F3UL, 0x20936079UL, 0x459B80A5UL, - 0xBE60E2DBUL, 0xA9C23101UL, 0xEBA5315CUL, 0x224E42F2UL, - 0x1C5C1572UL, 0xF6721B2CUL, 0x1AD2FFF3UL, 0x8C25404EUL, - 0x324ED72FUL, 0x4067B7FDUL, 0x0523138EUL, 0x5CA3BC78UL, - 0xDC0FD66EUL, 0x75922283UL, 0x784D6B17UL, 0x58EBB16EUL, - 0x44094F85UL, 0x3F481D87UL, 0xFCFEAE7BUL, 0x77B5FF76UL, - 0x8C2302BFUL, 0xAAF47556UL, 0x5F46B02AUL, 0x2B092801UL, - 0x3D38F5F7UL, 0x0CA81F36UL, 0x52AF4A8AUL, 0x66D5E7C0UL, - 0xDF3B0874UL, 0x95055110UL, 0x1B5AD7A8UL, 0xF61ED5ADUL, - 0x6CF6E479UL, 0x20758184UL, 0xD0CEFA65UL, 0x88F7BE58UL, - 0x4A046826UL, 0x0FF6F8F3UL, 0xA09C7F70UL, 0x5346ABA0UL, - 0x5CE96C28UL, 0xE176EDA3UL, 0x6BAC307FUL, 0x376829D2UL, - 0x85360FA9UL, 0x17E3FE2AUL, 0x24B79767UL, 0xF5A96B20UL, - 0xD6CD2595UL, 0x68FF1EBFUL, 0x7555442CUL, 0xF19F06BEUL, - 0xF9E0659AUL, 0xEEB9491DUL, 0x34010718UL, 0xBB30CAB8UL, - 0xE822FE15UL, 0x88570983UL, 0x750E6249UL, 0xDA627E55UL, - 0x5E76FFA8UL, 0xB1534546UL, 0x6D47DE08UL, 0xEFE9E7D4UL -}, - -{ - 0xF6FA8F9DUL, 0x2CAC6CE1UL, 0x4CA34867UL, 0xE2337F7CUL, - 0x95DB08E7UL, 0x016843B4UL, 0xECED5CBCUL, 0x325553ACUL, - 0xBF9F0960UL, 0xDFA1E2EDUL, 0x83F0579DUL, 0x63ED86B9UL, - 0x1AB6A6B8UL, 0xDE5EBE39UL, 0xF38FF732UL, 0x8989B138UL, - 0x33F14961UL, 0xC01937BDUL, 0xF506C6DAUL, 0xE4625E7EUL, - 0xA308EA99UL, 0x4E23E33CUL, 0x79CBD7CCUL, 0x48A14367UL, - 0xA3149619UL, 0xFEC94BD5UL, 0xA114174AUL, 0xEAA01866UL, - 0xA084DB2DUL, 0x09A8486FUL, 0xA888614AUL, 0x2900AF98UL, - 0x01665991UL, 0xE1992863UL, 0xC8F30C60UL, 0x2E78EF3CUL, - 0xD0D51932UL, 0xCF0FEC14UL, 0xF7CA07D2UL, 0xD0A82072UL, - 0xFD41197EUL, 0x9305A6B0UL, 0xE86BE3DAUL, 0x74BED3CDUL, - 0x372DA53CUL, 0x4C7F4448UL, 0xDAB5D440UL, 0x6DBA0EC3UL, - 0x083919A7UL, 0x9FBAEED9UL, 0x49DBCFB0UL, 0x4E670C53UL, - 0x5C3D9C01UL, 0x64BDB941UL, 0x2C0E636AUL, 0xBA7DD9CDUL, - 0xEA6F7388UL, 0xE70BC762UL, 0x35F29ADBUL, 0x5C4CDD8DUL, - 0xF0D48D8CUL, 0xB88153E2UL, 0x08A19866UL, 0x1AE2EAC8UL, - 0x284CAF89UL, 0xAA928223UL, 0x9334BE53UL, 0x3B3A21BFUL, - 0x16434BE3UL, 0x9AEA3906UL, 0xEFE8C36EUL, 0xF890CDD9UL, - 0x80226DAEUL, 0xC340A4A3UL, 0xDF7E9C09UL, 0xA694A807UL, - 0x5B7C5ECCUL, 0x221DB3A6UL, 0x9A69A02FUL, 0x68818A54UL, - 0xCEB2296FUL, 0x53C0843AUL, 0xFE893655UL, 0x25BFE68AUL, - 0xB4628ABCUL, 0xCF222EBFUL, 0x25AC6F48UL, 0xA9A99387UL, - 0x53BDDB65UL, 0xE76FFBE7UL, 0xE967FD78UL, 0x0BA93563UL, - 0x8E342BC1UL, 0xE8A11BE9UL, 0x4980740DUL, 0xC8087DFCUL, - 0x8DE4BF99UL, 0xA11101A0UL, 0x7FD37975UL, 0xDA5A26C0UL, - 0xE81F994FUL, 0x9528CD89UL, 0xFD339FEDUL, 0xB87834BFUL, - 0x5F04456DUL, 0x22258698UL, 0xC9C4C83BUL, 0x2DC156BEUL, - 0x4F628DAAUL, 0x57F55EC5UL, 0xE2220ABEUL, 0xD2916EBFUL, - 0x4EC75B95UL, 0x24F2C3C0UL, 0x42D15D99UL, 0xCD0D7FA0UL, - 0x7B6E27FFUL, 0xA8DC8AF0UL, 0x7345C106UL, 0xF41E232FUL, - 0x35162386UL, 0xE6EA8926UL, 0x3333B094UL, 0x157EC6F2UL, - 0x372B74AFUL, 0x692573E4UL, 0xE9A9D848UL, 0xF3160289UL, - 0x3A62EF1DUL, 0xA787E238UL, 0xF3A5F676UL, 0x74364853UL, - 0x20951063UL, 0x4576698DUL, 0xB6FAD407UL, 0x592AF950UL, - 0x36F73523UL, 0x4CFB6E87UL, 0x7DA4CEC0UL, 0x6C152DAAUL, - 0xCB0396A8UL, 0xC50DFE5DUL, 0xFCD707ABUL, 0x0921C42FUL, - 0x89DFF0BBUL, 0x5FE2BE78UL, 0x448F4F33UL, 0x754613C9UL, - 0x2B05D08DUL, 0x48B9D585UL, 0xDC049441UL, 0xC8098F9BUL, - 0x7DEDE786UL, 0xC39A3373UL, 0x42410005UL, 0x6A091751UL, - 0x0EF3C8A6UL, 0x890072D6UL, 0x28207682UL, 0xA9A9F7BEUL, - 0xBF32679DUL, 0xD45B5B75UL, 0xB353FD00UL, 0xCBB0E358UL, - 0x830F220AUL, 0x1F8FB214UL, 0xD372CF08UL, 0xCC3C4A13UL, - 0x8CF63166UL, 0x061C87BEUL, 0x88C98F88UL, 0x6062E397UL, - 0x47CF8E7AUL, 0xB6C85283UL, 0x3CC2ACFBUL, 0x3FC06976UL, - 0x4E8F0252UL, 0x64D8314DUL, 0xDA3870E3UL, 0x1E665459UL, - 0xC10908F0UL, 0x513021A5UL, 0x6C5B68B7UL, 0x822F8AA0UL, - 0x3007CD3EUL, 0x74719EEFUL, 0xDC872681UL, 0x073340D4UL, - 0x7E432FD9UL, 0x0C5EC241UL, 0x8809286CUL, 0xF592D891UL, - 0x08A930F6UL, 0x957EF305UL, 0xB7FBFFBDUL, 0xC266E96FUL, - 0x6FE4AC98UL, 0xB173ECC0UL, 0xBC60B42AUL, 0x953498DAUL, - 0xFBA1AE12UL, 0x2D4BD736UL, 0x0F25FAABUL, 0xA4F3FCEBUL, - 0xE2969123UL, 0x257F0C3DUL, 0x9348AF49UL, 0x361400BCUL, - 0xE8816F4AUL, 0x3814F200UL, 0xA3F94043UL, 0x9C7A54C2UL, - 0xBC704F57UL, 0xDA41E7F9UL, 0xC25AD33AUL, 0x54F4A084UL, - 0xB17F5505UL, 0x59357CBEUL, 0xEDBD15C8UL, 0x7F97C5ABUL, - 0xBA5AC7B5UL, 0xB6F6DEAFUL, 0x3A479C3AUL, 0x5302DA25UL, - 0x653D7E6AUL, 0x54268D49UL, 0x51A477EAUL, 0x5017D55BUL, - 0xD7D25D88UL, 0x44136C76UL, 0x0404A8C8UL, 0xB8E5A121UL, - 0xB81A928AUL, 0x60ED5869UL, 0x97C55B96UL, 0xEAEC991BUL, - 0x29935913UL, 0x01FDB7F1UL, 0x088E8DFAUL, 0x9AB6F6F5UL, - 0x3B4CBF9FUL, 0x4A5DE3ABUL, 0xE6051D35UL, 0xA0E1D855UL, - 0xD36B4CF1UL, 0xF544EDEBUL, 0xB0E93524UL, 0xBEBB8FBDUL, - 0xA2D762CFUL, 0x49C92F54UL, 0x38B5F331UL, 0x7128A454UL, - 0x48392905UL, 0xA65B1DB8UL, 0x851C97BDUL, 0xD675CF2FUL -}, - -{ - 0x85E04019UL, 0x332BF567UL, 0x662DBFFFUL, 0xCFC65693UL, - 0x2A8D7F6FUL, 0xAB9BC912UL, 0xDE6008A1UL, 0x2028DA1FUL, - 0x0227BCE7UL, 0x4D642916UL, 0x18FAC300UL, 0x50F18B82UL, - 0x2CB2CB11UL, 0xB232E75CUL, 0x4B3695F2UL, 0xB28707DEUL, - 0xA05FBCF6UL, 0xCD4181E9UL, 0xE150210CUL, 0xE24EF1BDUL, - 0xB168C381UL, 0xFDE4E789UL, 0x5C79B0D8UL, 0x1E8BFD43UL, - 0x4D495001UL, 0x38BE4341UL, 0x913CEE1DUL, 0x92A79C3FUL, - 0x089766BEUL, 0xBAEEADF4UL, 0x1286BECFUL, 0xB6EACB19UL, - 0x2660C200UL, 0x7565BDE4UL, 0x64241F7AUL, 0x8248DCA9UL, - 0xC3B3AD66UL, 0x28136086UL, 0x0BD8DFA8UL, 0x356D1CF2UL, - 0x107789BEUL, 0xB3B2E9CEUL, 0x0502AA8FUL, 0x0BC0351EUL, - 0x166BF52AUL, 0xEB12FF82UL, 0xE3486911UL, 0xD34D7516UL, - 0x4E7B3AFFUL, 0x5F43671BUL, 0x9CF6E037UL, 0x4981AC83UL, - 0x334266CEUL, 0x8C9341B7UL, 0xD0D854C0UL, 0xCB3A6C88UL, - 0x47BC2829UL, 0x4725BA37UL, 0xA66AD22BUL, 0x7AD61F1EUL, - 0x0C5CBAFAUL, 0x4437F107UL, 0xB6E79962UL, 0x42D2D816UL, - 0x0A961288UL, 0xE1A5C06EUL, 0x13749E67UL, 0x72FC081AUL, - 0xB1D139F7UL, 0xF9583745UL, 0xCF19DF58UL, 0xBEC3F756UL, - 0xC06EBA30UL, 0x07211B24UL, 0x45C28829UL, 0xC95E317FUL, - 0xBC8EC511UL, 0x38BC46E9UL, 0xC6E6FA14UL, 0xBAE8584AUL, - 0xAD4EBC46UL, 0x468F508BUL, 0x7829435FUL, 0xF124183BUL, - 0x821DBA9FUL, 0xAFF60FF4UL, 0xEA2C4E6DUL, 0x16E39264UL, - 0x92544A8BUL, 0x009B4FC3UL, 0xABA68CEDUL, 0x9AC96F78UL, - 0x06A5B79AUL, 0xB2856E6EUL, 0x1AEC3CA9UL, 0xBE838688UL, - 0x0E0804E9UL, 0x55F1BE56UL, 0xE7E5363BUL, 0xB3A1F25DUL, - 0xF7DEBB85UL, 0x61FE033CUL, 0x16746233UL, 0x3C034C28UL, - 0xDA6D0C74UL, 0x79AAC56CUL, 0x3CE4E1ADUL, 0x51F0C802UL, - 0x98F8F35AUL, 0x1626A49FUL, 0xEED82B29UL, 0x1D382FE3UL, - 0x0C4FB99AUL, 0xBB325778UL, 0x3EC6D97BUL, 0x6E77A6A9UL, - 0xCB658B5CUL, 0xD45230C7UL, 0x2BD1408BUL, 0x60C03EB7UL, - 0xB9068D78UL, 0xA33754F4UL, 0xF430C87DUL, 0xC8A71302UL, - 0xB96D8C32UL, 0xEBD4E7BEUL, 0xBE8B9D2DUL, 0x7979FB06UL, - 0xE7225308UL, 0x8B75CF77UL, 0x11EF8DA4UL, 0xE083C858UL, - 0x8D6B786FUL, 0x5A6317A6UL, 0xFA5CF7A0UL, 0x5DDA0033UL, - 0xF28EBFB0UL, 0xF5B9C310UL, 0xA0EAC280UL, 0x08B9767AUL, - 0xA3D9D2B0UL, 0x79D34217UL, 0x021A718DUL, 0x9AC6336AUL, - 0x2711FD60UL, 0x438050E3UL, 0x069908A8UL, 0x3D7FEDC4UL, - 0x826D2BEFUL, 0x4EEB8476UL, 0x488DCF25UL, 0x36C9D566UL, - 0x28E74E41UL, 0xC2610ACAUL, 0x3D49A9CFUL, 0xBAE3B9DFUL, - 0xB65F8DE6UL, 0x92AEAF64UL, 0x3AC7D5E6UL, 0x9EA80509UL, - 0xF22B017DUL, 0xA4173F70UL, 0xDD1E16C3UL, 0x15E0D7F9UL, - 0x50B1B887UL, 0x2B9F4FD5UL, 0x625ABA82UL, 0x6A017962UL, - 0x2EC01B9CUL, 0x15488AA9UL, 0xD716E740UL, 0x40055A2CUL, - 0x93D29A22UL, 0xE32DBF9AUL, 0x058745B9UL, 0x3453DC1EUL, - 0xD699296EUL, 0x496CFF6FUL, 0x1C9F4986UL, 0xDFE2ED07UL, - 0xB87242D1UL, 0x19DE7EAEUL, 0x053E561AUL, 0x15AD6F8CUL, - 0x66626C1CUL, 0x7154C24CUL, 0xEA082B2AUL, 0x93EB2939UL, - 0x17DCB0F0UL, 0x58D4F2AEUL, 0x9EA294FBUL, 0x52CF564CUL, - 0x9883FE66UL, 0x2EC40581UL, 0x763953C3UL, 0x01D6692EUL, - 0xD3A0C108UL, 0xA1E7160EUL, 0xE4F2DFA6UL, 0x693ED285UL, - 0x74904698UL, 0x4C2B0EDDUL, 0x4F757656UL, 0x5D393378UL, - 0xA132234FUL, 0x3D321C5DUL, 0xC3F5E194UL, 0x4B269301UL, - 0xC79F022FUL, 0x3C997E7EUL, 0x5E4F9504UL, 0x3FFAFBBDUL, - 0x76F7AD0EUL, 0x296693F4UL, 0x3D1FCE6FUL, 0xC61E45BEUL, - 0xD3B5AB34UL, 0xF72BF9B7UL, 0x1B0434C0UL, 0x4E72B567UL, - 0x5592A33DUL, 0xB5229301UL, 0xCFD2A87FUL, 0x60AEB767UL, - 0x1814386BUL, 0x30BCC33DUL, 0x38A0C07DUL, 0xFD1606F2UL, - 0xC363519BUL, 0x589DD390UL, 0x5479F8E6UL, 0x1CB8D647UL, - 0x97FD61A9UL, 0xEA7759F4UL, 0x2D57539DUL, 0x569A58CFUL, - 0xE84E63ADUL, 0x462E1B78UL, 0x6580F87EUL, 0xF3817914UL, - 0x91DA55F4UL, 0x40A230F3UL, 0xD1988F35UL, 0xB6E318D2UL, - 0x3FFA50BCUL, 0x3D40F021UL, 0xC3C0BDAEUL, 0x4958C24CUL, - 0x518F36B2UL, 0x84B1D370UL, 0x0FEDCE83UL, 0x878DDADAUL, - 0xF2A279C7UL, 0x94E01BE8UL, 0x90716F4BUL, 0x954B8AA3UL -}, - -{ - 0xE216300DUL, 0xBBDDFFFCUL, 0xA7EBDABDUL, 0x35648095UL, - 0x7789F8B7UL, 0xE6C1121BUL, 0x0E241600UL, 0x052CE8B5UL, - 0x11A9CFB0UL, 0xE5952F11UL, 0xECE7990AUL, 0x9386D174UL, - 0x2A42931CUL, 0x76E38111UL, 0xB12DEF3AUL, 0x37DDDDFCUL, - 0xDE9ADEB1UL, 0x0A0CC32CUL, 0xBE197029UL, 0x84A00940UL, - 0xBB243A0FUL, 0xB4D137CFUL, 0xB44E79F0UL, 0x049EEDFDUL, - 0x0B15A15DUL, 0x480D3168UL, 0x8BBBDE5AUL, 0x669DED42UL, - 0xC7ECE831UL, 0x3F8F95E7UL, 0x72DF191BUL, 0x7580330DUL, - 0x94074251UL, 0x5C7DCDFAUL, 0xABBE6D63UL, 0xAA402164UL, - 0xB301D40AUL, 0x02E7D1CAUL, 0x53571DAEUL, 0x7A3182A2UL, - 0x12A8DDECUL, 0xFDAA335DUL, 0x176F43E8UL, 0x71FB46D4UL, - 0x38129022UL, 0xCE949AD4UL, 0xB84769ADUL, 0x965BD862UL, - 0x82F3D055UL, 0x66FB9767UL, 0x15B80B4EUL, 0x1D5B47A0UL, - 0x4CFDE06FUL, 0xC28EC4B8UL, 0x57E8726EUL, 0x647A78FCUL, - 0x99865D44UL, 0x608BD593UL, 0x6C200E03UL, 0x39DC5FF6UL, - 0x5D0B00A3UL, 0xAE63AFF2UL, 0x7E8BD632UL, 0x70108C0CUL, - 0xBBD35049UL, 0x2998DF04UL, 0x980CF42AUL, 0x9B6DF491UL, - 0x9E7EDD53UL, 0x06918548UL, 0x58CB7E07UL, 0x3B74EF2EUL, - 0x522FFFB1UL, 0xD24708CCUL, 0x1C7E27CDUL, 0xA4EB215BUL, - 0x3CF1D2E2UL, 0x19B47A38UL, 0x424F7618UL, 0x35856039UL, - 0x9D17DEE7UL, 0x27EB35E6UL, 0xC9AFF67BUL, 0x36BAF5B8UL, - 0x09C467CDUL, 0xC18910B1UL, 0xE11DBF7BUL, 0x06CD1AF8UL, - 0x7170C608UL, 0x2D5E3354UL, 0xD4DE495AUL, 0x64C6D006UL, - 0xBCC0C62CUL, 0x3DD00DB3UL, 0x708F8F34UL, 0x77D51B42UL, - 0x264F620FUL, 0x24B8D2BFUL, 0x15C1B79EUL, 0x46A52564UL, - 0xF8D7E54EUL, 0x3E378160UL, 0x7895CDA5UL, 0x859C15A5UL, - 0xE6459788UL, 0xC37BC75FUL, 0xDB07BA0CUL, 0x0676A3ABUL, - 0x7F229B1EUL, 0x31842E7BUL, 0x24259FD7UL, 0xF8BEF472UL, - 0x835FFCB8UL, 0x6DF4C1F2UL, 0x96F5B195UL, 0xFD0AF0FCUL, - 0xB0FE134CUL, 0xE2506D3DUL, 0x4F9B12EAUL, 0xF215F225UL, - 0xA223736FUL, 0x9FB4C428UL, 0x25D04979UL, 0x34C713F8UL, - 0xC4618187UL, 0xEA7A6E98UL, 0x7CD16EFCUL, 0x1436876CUL, - 0xF1544107UL, 0xBEDEEE14UL, 0x56E9AF27UL, 0xA04AA441UL, - 0x3CF7C899UL, 0x92ECBAE6UL, 0xDD67016DUL, 0x151682EBUL, - 0xA842EEDFUL, 0xFDBA60B4UL, 0xF1907B75UL, 0x20E3030FUL, - 0x24D8C29EUL, 0xE139673BUL, 0xEFA63FB8UL, 0x71873054UL, - 0xB6F2CF3BUL, 0x9F326442UL, 0xCB15A4CCUL, 0xB01A4504UL, - 0xF1E47D8DUL, 0x844A1BE5UL, 0xBAE7DFDCUL, 0x42CBDA70UL, - 0xCD7DAE0AUL, 0x57E85B7AUL, 0xD53F5AF6UL, 0x20CF4D8CUL, - 0xCEA4D428UL, 0x79D130A4UL, 0x3486EBFBUL, 0x33D3CDDCUL, - 0x77853B53UL, 0x37EFFCB5UL, 0xC5068778UL, 0xE580B3E6UL, - 0x4E68B8F4UL, 0xC5C8B37EUL, 0x0D809EA2UL, 0x398FEB7CUL, - 0x132A4F94UL, 0x43B7950EUL, 0x2FEE7D1CUL, 0x223613BDUL, - 0xDD06CAA2UL, 0x37DF932BUL, 0xC4248289UL, 0xACF3EBC3UL, - 0x5715F6B7UL, 0xEF3478DDUL, 0xF267616FUL, 0xC148CBE4UL, - 0x9052815EUL, 0x5E410FABUL, 0xB48A2465UL, 0x2EDA7FA4UL, - 0xE87B40E4UL, 0xE98EA084UL, 0x5889E9E1UL, 0xEFD390FCUL, - 0xDD07D35BUL, 0xDB485694UL, 0x38D7E5B2UL, 0x57720101UL, - 0x730EDEBCUL, 0x5B643113UL, 0x94917E4FUL, 0x503C2FBAUL, - 0x646F1282UL, 0x7523D24AUL, 0xE0779695UL, 0xF9C17A8FUL, - 0x7A5B2121UL, 0xD187B896UL, 0x29263A4DUL, 0xBA510CDFUL, - 0x81F47C9FUL, 0xAD1163EDUL, 0xEA7B5965UL, 0x1A00726EUL, - 0x11403092UL, 0x00DA6D77UL, 0x4A0CDD61UL, 0xAD1F4603UL, - 0x605BDFB0UL, 0x9EEDC364UL, 0x22EBE6A8UL, 0xCEE7D28AUL, - 0xA0E736A0UL, 0x5564A6B9UL, 0x10853209UL, 0xC7EB8F37UL, - 0x2DE705CAUL, 0x8951570FUL, 0xDF09822BUL, 0xBD691A6CUL, - 0xAA12E4F2UL, 0x87451C0FUL, 0xE0F6A27AUL, 0x3ADA4819UL, - 0x4CF1764FUL, 0x0D771C2BUL, 0x67CDB156UL, 0x350D8384UL, - 0x5938FA0FUL, 0x42399EF3UL, 0x36997B07UL, 0x0E84093DUL, - 0x4AA93E61UL, 0x8360D87BUL, 0x1FA98B0CUL, 0x1149382CUL, - 0xE97625A5UL, 0x0614D1B7UL, 0x0E25244BUL, 0x0C768347UL, - 0x589E8D82UL, 0x0D2059D1UL, 0xA466BB1EUL, 0xF8DA0A82UL, - 0x04F19130UL, 0xBA6E4EC0UL, 0x99265164UL, 0x1EE7230DUL, - 0x50B2AD80UL, 0xEAEE6801UL, 0x8DB2A283UL, 0xEA8BF59EUL -}}; - -NAMESPACE_END diff --git a/CryptoPP/dll.h b/CryptoPP/dll.h index 5e42d46fc..50775e98b 100644 --- a/CryptoPP/dll.h +++ b/CryptoPP/dll.h @@ -34,7 +34,6 @@ #include "rsa.h" #include "rw.h" #include "sha.h" -#include "skipjack.h" #include "trdlocal.h" #ifdef CRYPTOPP_IMPORTS diff --git a/CryptoPP/fipstest.cpp b/CryptoPP/fipstest.cpp deleted file mode 100644 index e882742e9..000000000 --- a/CryptoPP/fipstest.cpp +++ /dev/null @@ -1,601 +0,0 @@ -// fipstest.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" - -#ifndef CRYPTOPP_IMPORTS - -#define CRYPTOPP_DEFAULT_NO_DLL -#include "dll.h" - -#ifdef CRYPTOPP_WIN32_AVAILABLE -#define _WIN32_WINNT 0x0400 -#include <windows.h> - -#if defined(_MSC_VER) && _MSC_VER >= 1400 -#ifdef _M_IX86 -#define _CRT_DEBUGGER_HOOK _crt_debugger_hook -#else -#define _CRT_DEBUGGER_HOOK __crt_debugger_hook -#endif -extern "C" {_CRTIMP void __cdecl _CRT_DEBUGGER_HOOK(int);} -#endif -#endif - -#include <iostream> - -NAMESPACE_BEGIN(CryptoPP) - -extern PowerUpSelfTestStatus g_powerUpSelfTestStatus; -SecByteBlock g_actualMac; -unsigned long g_macFileLocation = 0; - -// use a random dummy string here, to be searched/replaced later with the real MAC -static const byte s_moduleMac[CryptoPP::HMAC<CryptoPP::SHA1>::DIGESTSIZE] = CRYPTOPP_DUMMY_DLL_MAC; -CRYPTOPP_COMPILE_ASSERT(sizeof(s_moduleMac) == CryptoPP::SHA1::DIGESTSIZE); - -#ifdef CRYPTOPP_WIN32_AVAILABLE -static HMODULE s_hModule = NULL; -#endif - -const byte * CRYPTOPP_API GetActualMacAndLocation(unsigned int &macSize, unsigned int &fileLocation) -{ - macSize = (unsigned int)g_actualMac.size(); - fileLocation = g_macFileLocation; - return g_actualMac; -} - -void KnownAnswerTest(RandomNumberGenerator &rng, const char *output) -{ - EqualityComparisonFilter comparison; - - RandomNumberStore(rng, strlen(output)/2).TransferAllTo(comparison, "0"); - StringSource(output, true, new HexDecoder(new ChannelSwitch(comparison, "1"))); - - comparison.ChannelMessageSeriesEnd("0"); - comparison.ChannelMessageSeriesEnd("1"); -} - -template <class CIPHER> -void X917RNG_KnownAnswerTest( - const char *key, - const char *seed, - const char *deterministicTimeVector, - const char *output, - CIPHER *dummy = NULL) -{ -#ifdef OS_RNG_AVAILABLE - std::string decodedKey, decodedSeed, decodedDeterministicTimeVector; - StringSource(key, true, new HexDecoder(new StringSink(decodedKey))); - StringSource(seed, true, new HexDecoder(new StringSink(decodedSeed))); - StringSource(deterministicTimeVector, true, new HexDecoder(new StringSink(decodedDeterministicTimeVector))); - - AutoSeededX917RNG<CIPHER> rng(false, false); - rng.Reseed((const byte *)decodedKey.data(), decodedKey.size(), (const byte *)decodedSeed.data(), (const byte *)decodedDeterministicTimeVector.data()); - KnownAnswerTest(rng, output); -#else - throw 0; -#endif -} - -void KnownAnswerTest(StreamTransformation &encryption, StreamTransformation &decryption, const char *plaintext, const char *ciphertext) -{ - EqualityComparisonFilter comparison; - - StringSource(plaintext, true, new HexDecoder(new StreamTransformationFilter(encryption, new ChannelSwitch(comparison, "0"), StreamTransformationFilter::NO_PADDING))); - StringSource(ciphertext, true, new HexDecoder(new ChannelSwitch(comparison, "1"))); - - StringSource(ciphertext, true, new HexDecoder(new StreamTransformationFilter(decryption, new ChannelSwitch(comparison, "0"), StreamTransformationFilter::NO_PADDING))); - StringSource(plaintext, true, new HexDecoder(new ChannelSwitch(comparison, "1"))); - - comparison.ChannelMessageSeriesEnd("0"); - comparison.ChannelMessageSeriesEnd("1"); -} - -template <class CIPHER> -void SymmetricEncryptionKnownAnswerTest( - const char *key, - const char *hexIV, - const char *plaintext, - const char *ecb, - const char *cbc, - const char *cfb, - const char *ofb, - const char *ctr, - CIPHER *dummy = NULL) -{ - std::string decodedKey; - StringSource(key, true, new HexDecoder(new StringSink(decodedKey))); - - typename CIPHER::Encryption encryption((const byte *)decodedKey.data(), decodedKey.size()); - typename CIPHER::Decryption decryption((const byte *)decodedKey.data(), decodedKey.size()); - - SecByteBlock iv(encryption.BlockSize()); - StringSource(hexIV, true, new HexDecoder(new ArraySink(iv, iv.size()))); - - if (ecb) - KnownAnswerTest(ECB_Mode_ExternalCipher::Encryption(encryption).Ref(), ECB_Mode_ExternalCipher::Decryption(decryption).Ref(), plaintext, ecb); - if (cbc) - KnownAnswerTest(CBC_Mode_ExternalCipher::Encryption(encryption, iv).Ref(), CBC_Mode_ExternalCipher::Decryption(decryption, iv).Ref(), plaintext, cbc); - if (cfb) - KnownAnswerTest(CFB_Mode_ExternalCipher::Encryption(encryption, iv).Ref(), CFB_Mode_ExternalCipher::Decryption(encryption, iv).Ref(), plaintext, cfb); - if (ofb) - KnownAnswerTest(OFB_Mode_ExternalCipher::Encryption(encryption, iv).Ref(), OFB_Mode_ExternalCipher::Decryption(encryption, iv).Ref(), plaintext, ofb); - if (ctr) - KnownAnswerTest(CTR_Mode_ExternalCipher::Encryption(encryption, iv).Ref(), CTR_Mode_ExternalCipher::Decryption(encryption, iv).Ref(), plaintext, ctr); -} - -void KnownAnswerTest(HashTransformation &hash, const char *message, const char *digest) -{ - EqualityComparisonFilter comparison; - StringSource(digest, true, new HexDecoder(new ChannelSwitch(comparison, "1"))); - StringSource(message, true, new HashFilter(hash, new ChannelSwitch(comparison, "0"))); - - comparison.ChannelMessageSeriesEnd("0"); - comparison.ChannelMessageSeriesEnd("1"); -} - -template <class HASH> -void SecureHashKnownAnswerTest(const char *message, const char *digest, HASH *dummy = NULL) -{ - HASH hash; - KnownAnswerTest(hash, message, digest); -} - -template <class MAC> -void MAC_KnownAnswerTest(const char *key, const char *message, const char *digest, MAC *dummy = NULL) -{ - std::string decodedKey; - StringSource(key, true, new HexDecoder(new StringSink(decodedKey))); - - MAC mac((const byte *)decodedKey.data(), decodedKey.size()); - KnownAnswerTest(mac, message, digest); -} - -template <class SCHEME> -void SignatureKnownAnswerTest(const char *key, const char *message, const char *signature, SCHEME *dummy = NULL) -{ - typename SCHEME::Signer signer(StringSource(key, true, new HexDecoder).Ref()); - typename SCHEME::Verifier verifier(signer); - - RandomPool rng; - EqualityComparisonFilter comparison; - - StringSource(message, true, new SignerFilter(rng, signer, new ChannelSwitch(comparison, "0"))); - StringSource(signature, true, new HexDecoder(new ChannelSwitch(comparison, "1"))); - - comparison.ChannelMessageSeriesEnd("0"); - comparison.ChannelMessageSeriesEnd("1"); - - VerifierFilter verifierFilter(verifier, NULL, VerifierFilter::SIGNATURE_AT_BEGIN | VerifierFilter::THROW_EXCEPTION); - StringSource(signature, true, new HexDecoder(new Redirector(verifierFilter, Redirector::DATA_ONLY))); - StringSource(message, true, new Redirector(verifierFilter)); -} - -void EncryptionPairwiseConsistencyTest(const PK_Encryptor &encryptor, const PK_Decryptor &decryptor) -{ - try - { - RandomPool rng; - const char *testMessage ="test message"; - std::string ciphertext, decrypted; - - StringSource( - testMessage, - true, - new PK_EncryptorFilter( - rng, - encryptor, - new StringSink(ciphertext))); - - if (ciphertext == testMessage) - throw 0; - - StringSource( - ciphertext, - true, - new PK_DecryptorFilter( - rng, - decryptor, - new StringSink(decrypted))); - - if (decrypted != testMessage) - throw 0; - } - catch (...) - { - throw SelfTestFailure(encryptor.AlgorithmName() + ": pairwise consistency test failed"); - } -} - -void SignaturePairwiseConsistencyTest(const PK_Signer &signer, const PK_Verifier &verifier) -{ - try - { - RandomPool rng; - - StringSource( - "test message", - true, - new SignerFilter( - rng, - signer, - new VerifierFilter(verifier, NULL, VerifierFilter::THROW_EXCEPTION), - true)); - } - catch (...) - { - throw SelfTestFailure(signer.AlgorithmName() + ": pairwise consistency test failed"); - } -} - -template <class SCHEME> -void SignaturePairwiseConsistencyTest(const char *key, SCHEME *dummy = NULL) -{ - typename SCHEME::Signer signer(StringSource(key, true, new HexDecoder).Ref()); - typename SCHEME::Verifier verifier(signer); - - SignaturePairwiseConsistencyTest(signer, verifier); -} - -MessageAuthenticationCode * NewIntegrityCheckingMAC() -{ - byte key[] = {0x47, 0x1E, 0x33, 0x96, 0x65, 0xB1, 0x6A, 0xED, 0x0B, 0xF8, 0x6B, 0xFD, 0x01, 0x65, 0x05, 0xCC}; - return new HMAC<SHA1>(key, sizeof(key)); -} - -bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModuleMac, SecByteBlock *pActualMac, unsigned long *pMacFileLocation) -{ - std::auto_ptr<MessageAuthenticationCode> mac(NewIntegrityCheckingMAC()); - unsigned int macSize = mac->DigestSize(); - - SecByteBlock tempMac; - SecByteBlock &actualMac = pActualMac ? *pActualMac : tempMac; - actualMac.resize(macSize); - - unsigned long tempLocation; - unsigned long &macFileLocation = pMacFileLocation ? *pMacFileLocation : tempLocation; - macFileLocation = 0; - - MeterFilter verifier(new HashFilter(*mac, new ArraySink(actualMac, actualMac.size()))); -// MeterFilter verifier(new FileSink("c:\\dt.tmp")); - std::ifstream moduleStream; - -#ifdef CRYPTOPP_WIN32_AVAILABLE - HMODULE h; - { - char moduleFilenameBuf[MAX_PATH] = ""; - if (moduleFilename == NULL) - { -#if (_MSC_VER >= 1400 && !defined(_STLPORT_VERSION)) // ifstream doesn't support wide filename on other compilers - wchar_t wideModuleFilename[MAX_PATH]; - if (GetModuleFileNameW(s_hModule, wideModuleFilename, MAX_PATH) > 0) - { - moduleStream.open(wideModuleFilename, std::ios::in | std::ios::binary); - h = GetModuleHandleW(wideModuleFilename); - } - else -#endif - { - GetModuleFileNameA(s_hModule, moduleFilenameBuf, MAX_PATH); - moduleFilename = moduleFilenameBuf; - } - } -#endif - if (moduleFilename != NULL) - { - moduleStream.open(moduleFilename, std::ios::in | std::ios::binary); -#ifdef CRYPTOPP_WIN32_AVAILABLE - h = GetModuleHandleA(moduleFilename); - moduleFilename = NULL; - } -#endif - } - - if (!moduleStream) - { -#ifdef CRYPTOPP_WIN32_AVAILABLE - OutputDebugString("Crypto++ DLL integrity check failed. Cannot open file for reading."); -#endif - return false; - } - FileStore file(moduleStream); - -#ifdef CRYPTOPP_WIN32_AVAILABLE - // try to hash from memory first - const byte *memBase = (const byte *)h; - const IMAGE_DOS_HEADER *ph = (IMAGE_DOS_HEADER *)memBase; - const IMAGE_NT_HEADERS *phnt = (IMAGE_NT_HEADERS *)(memBase + ph->e_lfanew); - const IMAGE_SECTION_HEADER *phs = IMAGE_FIRST_SECTION(phnt); - DWORD nSections = phnt->FileHeader.NumberOfSections; - size_t currentFilePos = 0; - - size_t checksumPos = (byte *)&phnt->OptionalHeader.CheckSum - memBase; - size_t checksumSize = sizeof(phnt->OptionalHeader.CheckSum); - size_t certificateTableDirectoryPos = (byte *)&phnt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY] - memBase; - size_t certificateTableDirectorySize = sizeof(phnt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY]); - size_t certificateTablePos = phnt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress; - size_t certificateTableSize = phnt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY].Size; - - verifier.AddRangeToSkip(0, checksumPos, checksumSize); - verifier.AddRangeToSkip(0, certificateTableDirectoryPos, certificateTableDirectorySize); - verifier.AddRangeToSkip(0, certificateTablePos, certificateTableSize); - - while (nSections--) - { - switch (phs->Characteristics) - { - default: - break; - case IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_MEM_READ: - case IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ: - unsigned int sectionSize = STDMIN(phs->SizeOfRawData, phs->Misc.VirtualSize); - const byte *sectionMemStart = memBase + phs->VirtualAddress; - unsigned int sectionFileStart = phs->PointerToRawData; - size_t subSectionStart = 0, nextSubSectionStart; - - do - { - const byte *subSectionMemStart = sectionMemStart + subSectionStart; - size_t subSectionFileStart = sectionFileStart + subSectionStart; - size_t subSectionSize = sectionSize - subSectionStart; - nextSubSectionStart = 0; - - unsigned int entriesToReadFromDisk[] = {IMAGE_DIRECTORY_ENTRY_IMPORT, IMAGE_DIRECTORY_ENTRY_IAT}; - for (unsigned int i=0; i<sizeof(entriesToReadFromDisk)/sizeof(entriesToReadFromDisk[0]); i++) - { - const IMAGE_DATA_DIRECTORY &entry = phnt->OptionalHeader.DataDirectory[entriesToReadFromDisk[i]]; - const byte *entryMemStart = memBase + entry.VirtualAddress; - if (subSectionMemStart <= entryMemStart && entryMemStart < subSectionMemStart + subSectionSize) - { - subSectionSize = entryMemStart - subSectionMemStart; - nextSubSectionStart = entryMemStart - sectionMemStart + entry.Size; - } - } - -#if defined(_MSC_VER) && _MSC_VER >= 1400 - // first byte of _CRT_DEBUGGER_HOOK gets modified in memory by the debugger invisibly, so read it from file - if (IsDebuggerPresent()) - { - if (subSectionMemStart <= (byte *)&_CRT_DEBUGGER_HOOK && (byte *)&_CRT_DEBUGGER_HOOK < subSectionMemStart + subSectionSize) - { - subSectionSize = (byte *)&_CRT_DEBUGGER_HOOK - subSectionMemStart; - nextSubSectionStart = (byte *)&_CRT_DEBUGGER_HOOK - sectionMemStart + 1; - } - } -#endif - - if (subSectionMemStart <= expectedModuleMac && expectedModuleMac < subSectionMemStart + subSectionSize) - { - // found stored MAC - macFileLocation = (unsigned long)(subSectionFileStart + (expectedModuleMac - subSectionMemStart)); - verifier.AddRangeToSkip(0, macFileLocation, macSize); - } - - file.TransferTo(verifier, subSectionFileStart - currentFilePos); - verifier.Put(subSectionMemStart, subSectionSize); - file.Skip(subSectionSize); - currentFilePos = subSectionFileStart + subSectionSize; - subSectionStart = nextSubSectionStart; - } while (nextSubSectionStart != 0); - } - phs++; - } -#endif - file.TransferAllTo(verifier); - -#ifdef CRYPTOPP_WIN32_AVAILABLE - // if that fails (could be caused by debug breakpoints or DLL base relocation modifying image in memory), - // hash from disk instead - if (!VerifyBufsEqual(expectedModuleMac, actualMac, macSize)) - { - OutputDebugString("In memory integrity check failed. This may be caused by debug breakpoints or DLL relocation.\n"); - moduleStream.clear(); - moduleStream.seekg(0); - verifier.Initialize(MakeParameters(Name::OutputBuffer(), ByteArrayParameter(actualMac, (unsigned int)actualMac.size()))); -// verifier.Initialize(MakeParameters(Name::OutputFileName(), (const char *)"c:\\dt2.tmp")); - verifier.AddRangeToSkip(0, checksumPos, checksumSize); - verifier.AddRangeToSkip(0, certificateTableDirectoryPos, certificateTableDirectorySize); - verifier.AddRangeToSkip(0, certificateTablePos, certificateTableSize); - verifier.AddRangeToSkip(0, macFileLocation, macSize); - FileStore(moduleStream).TransferAllTo(verifier); - } -#endif - - if (VerifyBufsEqual(expectedModuleMac, actualMac, macSize)) - return true; - -#ifdef CRYPTOPP_WIN32_AVAILABLE - std::string hexMac; - HexEncoder(new StringSink(hexMac)).PutMessageEnd(actualMac, actualMac.size()); - OutputDebugString((("Crypto++ DLL integrity check failed. Actual MAC is: " + hexMac) + "\n").c_str()); -#endif - return false; -} - -void DoPowerUpSelfTest(const char *moduleFilename, const byte *expectedModuleMac) -{ - g_powerUpSelfTestStatus = POWER_UP_SELF_TEST_NOT_DONE; - SetPowerUpSelfTestInProgressOnThisThread(true); - - try - { - if (FIPS_140_2_ComplianceEnabled() || expectedModuleMac != NULL) - { - if (!IntegrityCheckModule(moduleFilename, expectedModuleMac, &g_actualMac, &g_macFileLocation)) - throw 0; // throw here so we break in the debugger, this will be caught right away - } - - // algorithm tests - - X917RNG_KnownAnswerTest<AES>( - "2b7e151628aed2a6abf7158809cf4f3c", // key - "000102030405060708090a0b0c0d0e0f", // seed - "00000000000000000000000000000001", // time vector - "D176EDD27493B0395F4D10546232B0693DC7061C03C3A554F09CECF6F6B46D945A"); // output - - SymmetricEncryptionKnownAnswerTest<DES_EDE3>( - "385D7189A5C3D485E1370AA5D408082B5CCCCB5E19F2D90E", - "C141B5FCCD28DC8A", - "6E1BD7C6120947A464A6AAB293A0F89A563D8D40D3461B68", - "64EAAD4ACBB9CEAD6C7615E7C7E4792FE587D91F20C7D2F4", - "6235A461AFD312973E3B4F7AA7D23E34E03371F8E8C376C9", - "E26BA806A59B0330DE40CA38E77A3E494BE2B212F6DD624B", - "E26BA806A59B03307DE2BCC25A08BA40A8BA335F5D604C62", - "E26BA806A59B03303C62C2EFF32D3ACDD5D5F35EBCC53371"); - - SymmetricEncryptionKnownAnswerTest<SKIPJACK>( - "1555E5531C3A169B2D65", - "6EC9795701F49864", - "00AFA48E9621E52E8CBDA312660184EDDB1F33D9DACDA8DA", - "DBEC73562EFCAEB56204EB8AE9557EBF77473FBB52D17CD1", - "0C7B0B74E21F99B8F2C8DF37879F6C044967F42A796DCA8B", - "79FDDA9724E36CC2E023E9A5C717A8A8A7FDA465CADCBF63", - "79FDDA9724E36CC26CACBD83C1ABC06EAF5B249BE5B1E040", - "79FDDA9724E36CC211B0AEC607B95A96BCDA318440B82F49"); - - SymmetricEncryptionKnownAnswerTest<AES>( - "2b7e151628aed2a6abf7158809cf4f3c", - "000102030405060708090a0b0c0d0e0f", - "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710", // plaintext - "3ad77bb40d7a3660a89ecaf32466ef97f5d3d58503b9699de785895a96fdbaaf43b1cd7f598ece23881b00e3ed0306887b0c785e27e8ad3f8223207104725dd4", // ecb - "7649abac8119b246cee98e9b12e9197d5086cb9b507219ee95db113a917678b273bed6b8e3c1743b7116e69e222295163ff1caa1681fac09120eca307586e1a7", // cbc - "3b3fd92eb72dad20333449f8e83cfb4ac8a64537a0b3a93fcde3cdad9f1ce58b26751f67a3cbb140b1808cf187a4f4dfc04b05357c5d1c0eeac4c66f9ff7f2e6", // cfb - "3b3fd92eb72dad20333449f8e83cfb4a7789508d16918f03f53c52dac54ed8259740051e9c5fecf64344f7a82260edcc304c6528f659c77866a510d9c1d6ae5e", // ofb - NULL); - - SymmetricEncryptionKnownAnswerTest<AES>( - "2b7e151628aed2a6abf7158809cf4f3c", - "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff", - "6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710", - NULL, - NULL, - NULL, - NULL, - "874d6191b620e3261bef6864990db6ce9806f66b7970fdff8617187bb9fffdff5ae4df3edbd5d35e5b4f09020db03eab1e031dda2fbe03d1792170a0f3009cee"); // ctr - - - SecureHashKnownAnswerTest<SHA1>( - "abc", - "A9993E364706816ABA3E25717850C26C9CD0D89D"); - - SecureHashKnownAnswerTest<SHA224>( - "abc", - "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7"); - - SecureHashKnownAnswerTest<SHA256>( - "abc", - "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"); - - SecureHashKnownAnswerTest<SHA384>( - "abc", - "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7"); - - SecureHashKnownAnswerTest<SHA512>( - "abc", - "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"); - - MAC_KnownAnswerTest<HMAC<SHA1> >( - "303132333435363738393a3b3c3d3e3f40414243", - "Sample #2", - "0922d3405faa3d194f82a45830737d5cc6c75d24"); - - const char *keyRSA1 = - "30820150020100300d06092a864886f70d01010105000482013a3082013602010002400a66791dc6988168de7ab77419bb7fb0" - "c001c62710270075142942e19a8d8c51d053b3e3782a1de5dc5af4ebe99468170114a1dfe67cdc9a9af55d655620bbab0203010001" - "02400123c5b61ba36edb1d3679904199a89ea80c09b9122e1400c09adcf7784676d01d23356a7d44d6bd8bd50e94bfc723fa" - "87d8862b75177691c11d757692df8881022033d48445c859e52340de704bcdda065fbb4058d740bd1d67d29e9c146c11cf61" - "0220335e8408866b0fd38dc7002d3f972c67389a65d5d8306566d5c4f2a5aa52628b0220045ec90071525325d3d46db79695e9af" - "acc4523964360e02b119baa366316241022015eb327360c7b60d12e5e2d16bdcd97981d17fba6b70db13b20b436e24eada590220" - "2ca6366d72781dfa24d34a9a24cbc2ae927a9958af426563ff63fb11658a461d"; - - const char *keyRSA2 = - "30820273020100300D06092A864886F70D01010105000482025D3082025902010002818100D40AF9" - "A2B713034249E5780056D70FC7DE75D76E44565AA6A6B8ED9646F3C19F9E254D72D7DE6E49DB2264" - "0C1D05AB9E2A5F901D8F3FE1F7AE02CEE2ECCE54A40ABAE55A004692752E70725AEEE7CDEA67628A" - "82A9239B4AB660C2BC56D9F01E90CBAAB9BF0FC8E17173CEFC5709A29391A7DDF3E0B758691AAF30" - "725B292F4F020111027F18C0BA087D082C45D75D3594E0767E4820818EB35612B80CEAB8C880ACA5" - "44B6876DFFEF85A576C0D45B551AFAA1FD63209CD745DF75C5A0F0B580296EA466CD0338207E4752" - "FF4E7DB724D8AE18CE5CF4153BB94C27869FBB50E64F02546E4B02997A0B8623E64017CC770759C6" - "695DB649EEFD829D688D441BCC4E7348F1024100EF86DD7AF3F32CDE8A9F6564E43A559A0C9F8BAD" - "36CC25330548B347AC158A345631FA90F7B873C36EFFAE2F7823227A3F580B5DD18304D5932751E7" - "43E9234F024100E2A039854B55688740E32A51DF4AF88613D91A371CF8DDD95D780A89D7CF2119A9" - "54F1AC0F3DCDB2F6959926E6D9D37D8BC07A4C634DE6F16315BD5F0DAC340102407ECEEDB9903572" - "1B76909F174BA6698DCA72953D957B22C0A871C8531EDE3A1BB52984A719BC010D1CA57A555DB83F" - "6DE54CBAB932AEC652F38D497A6F3F30CF024100854F30E4FF232E6DADB2CD99926855F484255AB7" - "01FBCDCB27EC426F33A7046972AA700ADBCA008763DF87440F52F4E070531AC385B55AAC1C2AE7DD" - "8F9278F1024100C313F4AF9E4A9DE1253C21080CE524251560C111550772FD08690F13FBE658342E" - "BD2D41C9DCB12374E871B1839E26CAE252E1AE3DAAD5F1EE1F42B4D0EE7581"; - - SignatureKnownAnswerTest<RSASS<PKCS1v15, SHA1> >( - keyRSA1, - "Everyone gets Friday off.", - "0610761F95FFD1B8F29DA34212947EC2AA0E358866A722F03CC3C41487ADC604A48FF54F5C6BEDB9FB7BD59F82D6E55D8F3174BA361B2214B2D74E8825E04E81"); - - SignatureKnownAnswerTest<RSASS_ISO<SHA1> >( - keyRSA2, - "test", - "32F6BA41C8930DE71EE67F2627172CC539EDE04267FDE03AC295E3C50311F26C3B275D3AF513AC96" - "8EE493BAB7DA3A754661D1A7C4A0D1A2B7EE8B313AACD8CB8BFBC5C15EFB0EF15C86A9334A1E87AD" - "291EB961B5CA0E84930429B28780816AA94F96FC2367B71E2D2E4866FA966795B147F00600E5207E" - "2F189C883B37477C"); - - SignaturePairwiseConsistencyTest<DSA>( - "3082014A0201003082012B06072A8648CE3804013082011E02818100F468699A6F6EBCC0120D3B34C8E007F125EC7D81F763B8D0F33869AE3BD6B9F2ECCC7DF34DF84C0307449E9B85D30D57194BCCEB310F48141914DD13A077AAF9B624A6CBE666BBA1D7EBEA95B5BA6F54417FD5D4E4220C601E071D316A24EA814E8B0122DBF47EE8AEEFD319EBB01DD95683F10DBB4FEB023F8262A07EAEB7FD02150082AD4E034DA6EEACDFDAE68C36F2BAD614F9E53B02818071AAF73361A26081529F7D84078ADAFCA48E031DB54AD57FB1A833ADBD8672328AABAA0C756247998D7A5B10DACA359D231332CE8120B483A784FE07D46EEBFF0D7D374A10691F78653E6DC29E27CCB1B174923960DFE5B959B919B2C3816C19251832AFD8E35D810E598F82877ABF7D40A041565168BD7F0E21E3FE2A8D8C1C0416021426EBA66E846E755169F84A1DA981D86502405DDF"); - - SignaturePairwiseConsistencyTest<ECDSA<EC2N, SHA1> >( - "302D020100301006072A8648CE3D020106052B8104000404163014020101040F0070337065E1E196980A9D00E37211"); - - SignaturePairwiseConsistencyTest<ECDSA<ECP, SHA1> >( - "3039020100301306072A8648CE3D020106082A8648CE3D030101041F301D02010104182BB8A13C8B867010BD9471D9E81FDB01ABD0538C64D6249A"); - - SignaturePairwiseConsistencyTest<RSASS<PSS, SHA1> >(keyRSA1); - } - catch (...) - { - g_powerUpSelfTestStatus = POWER_UP_SELF_TEST_FAILED; - goto done; - } - - g_powerUpSelfTestStatus = POWER_UP_SELF_TEST_PASSED; - -done: - SetPowerUpSelfTestInProgressOnThisThread(false); - return; -} - -#ifdef CRYPTOPP_WIN32_AVAILABLE - -void DoDllPowerUpSelfTest() -{ - CryptoPP::DoPowerUpSelfTest(NULL, s_moduleMac); -} - -#else - -void DoDllPowerUpSelfTest() -{ - throw NotImplemented("DoDllPowerUpSelfTest() only available on Windows"); -} - -#endif // #ifdef CRYPTOPP_WIN32_AVAILABLE - -NAMESPACE_END - -#ifdef CRYPTOPP_WIN32_AVAILABLE - -// DllMain needs to be in the global namespace -BOOL APIENTRY DllMain(HANDLE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved) -{ - if (ul_reason_for_call == DLL_PROCESS_ATTACH) - { - CryptoPP::s_hModule = (HMODULE)hModule; - CryptoPP::DoDllPowerUpSelfTest(); - } - return TRUE; -} - -#endif // #ifdef CRYPTOPP_WIN32_AVAILABLE - -#endif // #ifndef CRYPTOPP_IMPORTS diff --git a/CryptoPP/gost.cpp b/CryptoPP/gost.cpp deleted file mode 100644 index bbd829752..000000000 --- a/CryptoPP/gost.cpp +++ /dev/null @@ -1,123 +0,0 @@ -#include "pch.h" -#include "gost.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -// these are the S-boxes given in Applied Cryptography 2nd Ed., p. 333 -const byte GOST::Base::sBox[8][16]={ - {4, 10, 9, 2, 13, 8, 0, 14, 6, 11, 1, 12, 7, 15, 5, 3}, - {14, 11, 4, 12, 6, 13, 15, 10, 2, 3, 8, 1, 0, 7, 5, 9}, - {5, 8, 1, 13, 10, 3, 4, 2, 14, 15, 12, 7, 6, 0, 9, 11}, - {7, 13, 10, 1, 0, 8, 9, 15, 14, 4, 6, 12, 11, 2, 5, 3}, - {6, 12, 7, 1, 5, 15, 13, 8, 4, 10, 9, 14, 0, 3, 11, 2}, - {4, 11, 10, 0, 7, 2, 1, 13, 3, 6, 8, 5, 9, 12, 15, 14}, - {13, 11, 4, 1, 3, 15, 5, 9, 0, 10, 14, 7, 6, 8, 2, 12}, - {1, 15, 13, 0, 5, 7, 10, 4, 9, 2, 3, 14, 6, 11, 8, 12}}; - -/* // these are the S-boxes given in the GOST source code listing in Applied - // Cryptography 2nd Ed., p. 644. they appear to be from the DES S-boxes - {13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7 }, - { 4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1 }, - {12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11 }, - { 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9 }, - { 7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15 }, - {10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8 }, - {15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10 }, - {14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7 }}; -*/ - -volatile bool GOST::Base::sTableCalculated = false; -word32 GOST::Base::sTable[4][256]; - -void GOST::Base::UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &) -{ - AssertValidKeyLength(length); - - PrecalculateSTable(); - - GetUserKey(LITTLE_ENDIAN_ORDER, key.begin(), 8, userKey, KEYLENGTH); -} - -void GOST::Base::PrecalculateSTable() -{ - if (!sTableCalculated) - { - for (unsigned i = 0; i < 4; i++) - for (unsigned j = 0; j < 256; j++) - { - word32 temp = sBox[2*i][j%16] | (sBox[2*i+1][j/16] << 4); - sTable[i][j] = rotlMod(temp, 11+8*i); - } - - sTableCalculated=true; - } -} - -#define f(x) ( t=x, \ - sTable[3][GETBYTE(t, 3)] ^ sTable[2][GETBYTE(t, 2)] \ - ^ sTable[1][GETBYTE(t, 1)] ^ sTable[0][GETBYTE(t, 0)] ) - -typedef BlockGetAndPut<word32, LittleEndian> Block; - -void GOST::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 n1, n2, t; - - Block::Get(inBlock)(n1)(n2); - - for (unsigned int i=0; i<3; i++) - { - n2 ^= f(n1+key[0]); - n1 ^= f(n2+key[1]); - n2 ^= f(n1+key[2]); - n1 ^= f(n2+key[3]); - n2 ^= f(n1+key[4]); - n1 ^= f(n2+key[5]); - n2 ^= f(n1+key[6]); - n1 ^= f(n2+key[7]); - } - - n2 ^= f(n1+key[7]); - n1 ^= f(n2+key[6]); - n2 ^= f(n1+key[5]); - n1 ^= f(n2+key[4]); - n2 ^= f(n1+key[3]); - n1 ^= f(n2+key[2]); - n2 ^= f(n1+key[1]); - n1 ^= f(n2+key[0]); - - Block::Put(xorBlock, outBlock)(n2)(n1); -} - -void GOST::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 n1, n2, t; - - Block::Get(inBlock)(n1)(n2); - - n2 ^= f(n1+key[0]); - n1 ^= f(n2+key[1]); - n2 ^= f(n1+key[2]); - n1 ^= f(n2+key[3]); - n2 ^= f(n1+key[4]); - n1 ^= f(n2+key[5]); - n2 ^= f(n1+key[6]); - n1 ^= f(n2+key[7]); - - for (unsigned int i=0; i<3; i++) - { - n2 ^= f(n1+key[7]); - n1 ^= f(n2+key[6]); - n2 ^= f(n1+key[5]); - n1 ^= f(n2+key[4]); - n2 ^= f(n1+key[3]); - n1 ^= f(n2+key[2]); - n2 ^= f(n1+key[1]); - n1 ^= f(n2+key[0]); - } - - Block::Put(xorBlock, outBlock)(n2)(n1); -} - -NAMESPACE_END diff --git a/CryptoPP/gost.h b/CryptoPP/gost.h deleted file mode 100644 index e6fe4693d..000000000 --- a/CryptoPP/gost.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef CRYPTOPP_GOST_H -#define CRYPTOPP_GOST_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct GOST_Info : public FixedBlockSize<8>, public FixedKeyLength<32> -{ - static const char *StaticAlgorithmName() {return "GOST";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#GOST">GOST</a> -class GOST : public GOST_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<GOST_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - static void PrecalculateSTable(); - - static const byte sBox[8][16]; - static volatile bool sTableCalculated; - static word32 sTable[4][256]; - - FixedSizeSecBlock<word32, 8> key; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef GOST::Encryption GOSTEncryption; -typedef GOST::Decryption GOSTDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/ida.cpp b/CryptoPP/ida.cpp deleted file mode 100644 index 5cb43b228..000000000 --- a/CryptoPP/ida.cpp +++ /dev/null @@ -1,421 +0,0 @@ -// ida.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "ida.h" - -#include "algebra.h" -#include "gf2_32.h" -#include "polynomi.h" -#include <functional> - -#include "polynomi.cpp" - -ANONYMOUS_NAMESPACE_BEGIN -static const CryptoPP::GF2_32 field; -NAMESPACE_END - -using namespace std; - -NAMESPACE_BEGIN(CryptoPP) - -void RawIDA::IsolatedInitialize(const NameValuePairs ¶meters) -{ - if (!parameters.GetIntValue("RecoveryThreshold", m_threshold)) - throw InvalidArgument("RawIDA: missing RecoveryThreshold argument"); - - if (m_threshold <= 0) - throw InvalidArgument("RawIDA: RecoveryThreshold must be greater than 0"); - - m_lastMapPosition = m_inputChannelMap.end(); - m_channelsReady = 0; - m_channelsFinished = 0; - m_w.New(m_threshold); - m_y.New(m_threshold); - m_inputQueues.reserve(m_threshold); - - m_outputChannelIds.clear(); - m_outputChannelIdStrings.clear(); - m_outputQueues.clear(); - - word32 outputChannelID; - if (parameters.GetValue("OutputChannelID", outputChannelID)) - AddOutputChannel(outputChannelID); - else - { - int nShares = parameters.GetIntValueWithDefault("NumberOfShares", m_threshold); - for (int i=0; i<nShares; i++) - AddOutputChannel(i); - } -} - -unsigned int RawIDA::InsertInputChannel(word32 channelId) -{ - if (m_lastMapPosition != m_inputChannelMap.end()) - { - if (m_lastMapPosition->first == channelId) - goto skipFind; - ++m_lastMapPosition; - if (m_lastMapPosition != m_inputChannelMap.end() && m_lastMapPosition->first == channelId) - goto skipFind; - } - m_lastMapPosition = m_inputChannelMap.find(channelId); - -skipFind: - if (m_lastMapPosition == m_inputChannelMap.end()) - { - if (m_inputChannelIds.size() == m_threshold) - return m_threshold; - - m_lastMapPosition = m_inputChannelMap.insert(InputChannelMap::value_type(channelId, (unsigned int)m_inputChannelIds.size())).first; - m_inputQueues.push_back(MessageQueue()); - m_inputChannelIds.push_back(channelId); - - if (m_inputChannelIds.size() == m_threshold) - PrepareInterpolation(); - } - return m_lastMapPosition->second; -} - -unsigned int RawIDA::LookupInputChannel(word32 channelId) const -{ - map<word32, unsigned int>::const_iterator it = m_inputChannelMap.find(channelId); - if (it == m_inputChannelMap.end()) - return m_threshold; - else - return it->second; -} - -void RawIDA::ChannelData(word32 channelId, const byte *inString, size_t length, bool messageEnd) -{ - int i = InsertInputChannel(channelId); - if (i < m_threshold) - { - lword size = m_inputQueues[i].MaxRetrievable(); - m_inputQueues[i].Put(inString, length); - if (size < 4 && size + length >= 4) - { - m_channelsReady++; - if (m_channelsReady == m_threshold) - ProcessInputQueues(); - } - - if (messageEnd) - { - m_inputQueues[i].MessageEnd(); - if (m_inputQueues[i].NumberOfMessages() == 1) - { - m_channelsFinished++; - if (m_channelsFinished == m_threshold) - { - m_channelsReady = 0; - for (i=0; i<m_threshold; i++) - m_channelsReady += m_inputQueues[i].AnyRetrievable(); - ProcessInputQueues(); - } - } - } - } -} - -lword RawIDA::InputBuffered(word32 channelId) const -{ - int i = LookupInputChannel(channelId); - return i < m_threshold ? m_inputQueues[i].MaxRetrievable() : 0; -} - -void RawIDA::ComputeV(unsigned int i) -{ - if (i >= m_v.size()) - { - m_v.resize(i+1); - m_outputToInput.resize(i+1); - } - - m_outputToInput[i] = LookupInputChannel(m_outputChannelIds[i]); - if (m_outputToInput[i] == m_threshold && i * m_threshold <= 1000*1000) - { - m_v[i].resize(m_threshold); - PrepareBulkPolynomialInterpolationAt(field, m_v[i].begin(), m_outputChannelIds[i], &(m_inputChannelIds[0]), m_w.begin(), m_threshold); - } -} - -void RawIDA::AddOutputChannel(word32 channelId) -{ - m_outputChannelIds.push_back(channelId); - m_outputChannelIdStrings.push_back(WordToString(channelId)); - m_outputQueues.push_back(ByteQueue()); - if (m_inputChannelIds.size() == m_threshold) - ComputeV((unsigned int)m_outputChannelIds.size() - 1); -} - -void RawIDA::PrepareInterpolation() -{ - assert(m_inputChannelIds.size() == m_threshold); - PrepareBulkPolynomialInterpolation(field, m_w.begin(), &(m_inputChannelIds[0]), m_threshold); - for (unsigned int i=0; i<m_outputChannelIds.size(); i++) - ComputeV(i); -} - -void RawIDA::ProcessInputQueues() -{ - bool finished = (m_channelsFinished == m_threshold); - int i; - - while (finished ? m_channelsReady > 0 : m_channelsReady == m_threshold) - { - m_channelsReady = 0; - for (i=0; i<m_threshold; i++) - { - MessageQueue &queue = m_inputQueues[i]; - queue.GetWord32(m_y[i]); - - if (finished) - m_channelsReady += queue.AnyRetrievable(); - else - m_channelsReady += queue.NumberOfMessages() > 0 || queue.MaxRetrievable() >= 4; - } - - for (i=0; (unsigned int)i<m_outputChannelIds.size(); i++) - { - if (m_outputToInput[i] != m_threshold) - m_outputQueues[i].PutWord32(m_y[m_outputToInput[i]]); - else if (m_v[i].size() == m_threshold) - m_outputQueues[i].PutWord32(BulkPolynomialInterpolateAt(field, m_y.begin(), m_v[i].begin(), m_threshold)); - else - { - m_u.resize(m_threshold); - PrepareBulkPolynomialInterpolationAt(field, m_u.begin(), m_outputChannelIds[i], &(m_inputChannelIds[0]), m_w.begin(), m_threshold); - m_outputQueues[i].PutWord32(BulkPolynomialInterpolateAt(field, m_y.begin(), m_u.begin(), m_threshold)); - } - } - } - - if (m_outputChannelIds.size() > 0 && m_outputQueues[0].AnyRetrievable()) - FlushOutputQueues(); - - if (finished) - { - OutputMessageEnds(); - - m_channelsReady = 0; - m_channelsFinished = 0; - m_v.clear(); - - vector<MessageQueue> inputQueues; - vector<word32> inputChannelIds; - - inputQueues.swap(m_inputQueues); - inputChannelIds.swap(m_inputChannelIds); - m_inputChannelMap.clear(); - m_lastMapPosition = m_inputChannelMap.end(); - - for (i=0; i<m_threshold; i++) - { - inputQueues[i].GetNextMessage(); - inputQueues[i].TransferAllTo(*AttachedTransformation(), WordToString(inputChannelIds[i])); - } - } -} - -void RawIDA::FlushOutputQueues() -{ - for (unsigned int i=0; i<m_outputChannelIds.size(); i++) - m_outputQueues[i].TransferAllTo(*AttachedTransformation(), m_outputChannelIdStrings[i]); -} - -void RawIDA::OutputMessageEnds() -{ - if (GetAutoSignalPropagation() != 0) - { - for (unsigned int i=0; i<m_outputChannelIds.size(); i++) - AttachedTransformation()->ChannelMessageEnd(m_outputChannelIdStrings[i], GetAutoSignalPropagation()-1); - } -} - -// **************************************************************** - -void SecretSharing::IsolatedInitialize(const NameValuePairs ¶meters) -{ - m_pad = parameters.GetValueWithDefault("AddPadding", true); - m_ida.IsolatedInitialize(parameters); -} - -size_t SecretSharing::Put2(const byte *begin, size_t length, int messageEnd, bool blocking) -{ - if (!blocking) - throw BlockingInputOnly("SecretSharing"); - - SecByteBlock buf(UnsignedMin(256, length)); - unsigned int threshold = m_ida.GetThreshold(); - while (length > 0) - { - size_t len = STDMIN(length, buf.size()); - m_ida.ChannelData(0xffffffff, begin, len, false); - for (unsigned int i=0; i<threshold-1; i++) - { - m_rng.GenerateBlock(buf, len); - m_ida.ChannelData(i, buf, len, false); - } - length -= len; - begin += len; - } - - if (messageEnd) - { - m_ida.SetAutoSignalPropagation(messageEnd-1); - if (m_pad) - { - SecretSharing::Put(1); - while (m_ida.InputBuffered(0xffffffff) > 0) - SecretSharing::Put(0); - } - m_ida.ChannelData(0xffffffff, NULL, 0, true); - for (unsigned int i=0; i<m_ida.GetThreshold()-1; i++) - m_ida.ChannelData(i, NULL, 0, true); - } - - return 0; -} - -void SecretRecovery::IsolatedInitialize(const NameValuePairs ¶meters) -{ - m_pad = parameters.GetValueWithDefault("RemovePadding", true); - RawIDA::IsolatedInitialize(CombinedNameValuePairs(parameters, MakeParameters("OutputChannelID", (word32)0xffffffff))); -} - -void SecretRecovery::FlushOutputQueues() -{ - if (m_pad) - m_outputQueues[0].TransferTo(*AttachedTransformation(), m_outputQueues[0].MaxRetrievable()-4); - else - m_outputQueues[0].TransferTo(*AttachedTransformation()); -} - -void SecretRecovery::OutputMessageEnds() -{ - if (m_pad) - { - PaddingRemover paddingRemover(new Redirector(*AttachedTransformation())); - m_outputQueues[0].TransferAllTo(paddingRemover); - } - - if (GetAutoSignalPropagation() != 0) - AttachedTransformation()->MessageEnd(GetAutoSignalPropagation()-1); -} - -// **************************************************************** - -void InformationDispersal::IsolatedInitialize(const NameValuePairs ¶meters) -{ - m_nextChannel = 0; - m_pad = parameters.GetValueWithDefault("AddPadding", true); - m_ida.IsolatedInitialize(parameters); -} - -size_t InformationDispersal::Put2(const byte *begin, size_t length, int messageEnd, bool blocking) -{ - if (!blocking) - throw BlockingInputOnly("InformationDispersal"); - - while (length--) - { - m_ida.ChannelData(m_nextChannel, begin, 1, false); - begin++; - m_nextChannel++; - if (m_nextChannel == m_ida.GetThreshold()) - m_nextChannel = 0; - } - - if (messageEnd) - { - m_ida.SetAutoSignalPropagation(messageEnd-1); - if (m_pad) - InformationDispersal::Put(1); - for (word32 i=0; i<m_ida.GetThreshold(); i++) - m_ida.ChannelData(i, NULL, 0, true); - } - - return 0; -} - -void InformationRecovery::IsolatedInitialize(const NameValuePairs ¶meters) -{ - m_pad = parameters.GetValueWithDefault("RemovePadding", true); - RawIDA::IsolatedInitialize(parameters); -} - -void InformationRecovery::FlushOutputQueues() -{ - while (m_outputQueues[0].AnyRetrievable()) - { - for (unsigned int i=0; i<m_outputChannelIds.size(); i++) - m_outputQueues[i].TransferTo(m_queue, 1); - } - - if (m_pad) - m_queue.TransferTo(*AttachedTransformation(), m_queue.MaxRetrievable()-4*m_threshold); - else - m_queue.TransferTo(*AttachedTransformation()); -} - -void InformationRecovery::OutputMessageEnds() -{ - if (m_pad) - { - PaddingRemover paddingRemover(new Redirector(*AttachedTransformation())); - m_queue.TransferAllTo(paddingRemover); - } - - if (GetAutoSignalPropagation() != 0) - AttachedTransformation()->MessageEnd(GetAutoSignalPropagation()-1); -} - -size_t PaddingRemover::Put2(const byte *begin, size_t length, int messageEnd, bool blocking) -{ - if (!blocking) - throw BlockingInputOnly("PaddingRemover"); - - const byte *const end = begin + length; - - if (m_possiblePadding) - { - size_t len = find_if(begin, end, bind2nd(not_equal_to<byte>(), 0)) - begin; - m_zeroCount += len; - begin += len; - if (begin == end) - return 0; - - AttachedTransformation()->Put(1); - while (m_zeroCount--) - AttachedTransformation()->Put(0); - AttachedTransformation()->Put(*begin++); - m_possiblePadding = false; - } - -#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER <= 1300) - // VC60 and VC7 workaround: built-in reverse_iterator has two template parameters, Dinkumware only has one - typedef reverse_bidirectional_iterator<const byte *, const byte> RevIt; -#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) - typedef reverse_iterator<const byte *, random_access_iterator_tag, const byte> RevIt; -#else - typedef reverse_iterator<const byte *> RevIt; -#endif - const byte *x = find_if(RevIt(end), RevIt(begin), bind2nd(not_equal_to<byte>(), 0)).base(); - if (x != begin && *(x-1) == 1) - { - AttachedTransformation()->Put(begin, x-begin-1); - m_possiblePadding = true; - m_zeroCount = end - x; - } - else - AttachedTransformation()->Put(begin, end-begin); - - if (messageEnd) - { - m_possiblePadding = false; - Output(0, begin, length, messageEnd, blocking); - } - return 0; -} - -NAMESPACE_END diff --git a/CryptoPP/ida.h b/CryptoPP/ida.h deleted file mode 100644 index 8ebb4ec91..000000000 --- a/CryptoPP/ida.h +++ /dev/null @@ -1,152 +0,0 @@ -#ifndef CRYPTOPP_IDA_H -#define CRYPTOPP_IDA_H - -#include "mqueue.h" -#include "filters.h" -#include "channels.h" -#include <map> -#include <vector> - -NAMESPACE_BEGIN(CryptoPP) - -/// base class for secret sharing and information dispersal -class RawIDA : public AutoSignaling<Unflushable<Multichannel<Filter> > > -{ -public: - RawIDA(BufferedTransformation *attachment=NULL) - {Detach(attachment);} - - unsigned int GetThreshold() const {return m_threshold;} - void AddOutputChannel(word32 channelId); - void ChannelData(word32 channelId, const byte *inString, size_t length, bool messageEnd); - lword InputBuffered(word32 channelId) const; - - void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - size_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking) - { - if (!blocking) - throw BlockingInputOnly("RawIDA"); - ChannelData(StringToWord<word32>(channel), begin, length, messageEnd != 0); - return 0; - } - -protected: - virtual void FlushOutputQueues(); - virtual void OutputMessageEnds(); - - unsigned int InsertInputChannel(word32 channelId); - unsigned int LookupInputChannel(word32 channelId) const; - void ComputeV(unsigned int); - void PrepareInterpolation(); - void ProcessInputQueues(); - - typedef std::map<word32, unsigned int> InputChannelMap; - InputChannelMap m_inputChannelMap; - InputChannelMap::iterator m_lastMapPosition; - std::vector<MessageQueue> m_inputQueues; - std::vector<word32> m_inputChannelIds, m_outputChannelIds, m_outputToInput; - std::vector<std::string> m_outputChannelIdStrings; - std::vector<ByteQueue> m_outputQueues; - int m_threshold; - unsigned int m_channelsReady, m_channelsFinished; - std::vector<SecBlock<word32> > m_v; - SecBlock<word32> m_u, m_w, m_y; -}; - -/// a variant of Shamir's Secret Sharing Algorithm -class SecretSharing : public CustomFlushPropagation<Filter> -{ -public: - SecretSharing(RandomNumberGenerator &rng, int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true) - : m_rng(rng), m_ida(new OutputProxy(*this, true)) - { - Detach(attachment); - IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding)); - } - - void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking); - bool Flush(bool hardFlush, int propagation=-1, bool blocking=true) {return m_ida.Flush(hardFlush, propagation, blocking);} - -protected: - RandomNumberGenerator &m_rng; - RawIDA m_ida; - bool m_pad; -}; - -/// a variant of Shamir's Secret Sharing Algorithm -class SecretRecovery : public RawIDA -{ -public: - SecretRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true) - : RawIDA(attachment) - {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding));} - - void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - -protected: - void FlushOutputQueues(); - void OutputMessageEnds(); - - bool m_pad; -}; - -/// a variant of Rabin's Information Dispersal Algorithm -class InformationDispersal : public CustomFlushPropagation<Filter> -{ -public: - InformationDispersal(int threshold, int nShares, BufferedTransformation *attachment=NULL, bool addPadding=true) - : m_ida(new OutputProxy(*this, true)) - { - Detach(attachment); - IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("NumberOfShares", nShares)("AddPadding", addPadding)); - } - - void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking); - bool Flush(bool hardFlush, int propagation=-1, bool blocking=true) {return m_ida.Flush(hardFlush, propagation, blocking);} - -protected: - RawIDA m_ida; - bool m_pad; - unsigned int m_nextChannel; -}; - -/// a variant of Rabin's Information Dispersal Algorithm -class InformationRecovery : public RawIDA -{ -public: - InformationRecovery(int threshold, BufferedTransformation *attachment=NULL, bool removePadding=true) - : RawIDA(attachment) - {IsolatedInitialize(MakeParameters("RecoveryThreshold", threshold)("RemovePadding", removePadding));} - - void IsolatedInitialize(const NameValuePairs ¶meters=g_nullNameValuePairs); - -protected: - void FlushOutputQueues(); - void OutputMessageEnds(); - - bool m_pad; - ByteQueue m_queue; -}; - -class PaddingRemover : public Unflushable<Filter> -{ -public: - PaddingRemover(BufferedTransformation *attachment=NULL) - : m_possiblePadding(false) {Detach(attachment);} - - void IsolatedInitialize(const NameValuePairs ¶meters) {m_possiblePadding = false;} - size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking); - - // GetPossiblePadding() == false at the end of a message indicates incorrect padding - bool GetPossiblePadding() const {return m_possiblePadding;} - -private: - bool m_possiblePadding; - lword m_zeroCount; -}; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/idea.cpp b/CryptoPP/idea.cpp deleted file mode 100644 index 793f912fb..000000000 --- a/CryptoPP/idea.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// idea.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "idea.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -static const int IDEA_KEYLEN=(6*IDEA::ROUNDS+4); // key schedule length in # of word16s - -#define low16(x) ((x)&0xffff) // compiler should be able to optimize this away if word is 16 bits -#define high16(x) ((x)>>16) - -CRYPTOPP_COMPILE_ASSERT(sizeof(IDEA::Word) >= 2); - -// should use an inline function but macros are still faster in MSVC 4.0 -#define DirectMUL(a,b) \ -{ \ - assert(b <= 0xffff); \ - \ - word32 p=(word32)low16(a)*b; \ - \ - if (p) \ - { \ - p = low16(p) - high16(p); \ - a = (IDEA::Word)p - (IDEA::Word)high16(p); \ - } \ - else \ - a = 1-a-b; \ -} - -#ifdef IDEA_LARGECACHE -volatile bool IDEA::Base::tablesBuilt = false; -word16 IDEA::Base::log[0x10000]; -word16 IDEA::Base::antilog[0x10000]; - -void IDEA::Base::BuildLogTables() -{ - if (tablesBuilt) - return; - else - { - tablesBuilt = true; - - IDEA::Word x=1; - word32 i; - - for (i=0; i<0x10000; i++) - { - antilog[i] = (word16)x; - DirectMUL(x, 3); - } - - for (i=0; i<0x10000; i++) - log[antilog[i]] = (word16)i; - } -} - -void IDEA::Base::LookupKeyLogs() -{ - IDEA::Word* Z=key; - int r=ROUNDS; - do - { - Z[0] = log[Z[0]]; - Z[3] = log[Z[3]]; - Z[4] = log[Z[4]]; - Z[5] = log[Z[5]]; - Z+=6; - } while (--r); - Z[0] = log[Z[0]]; - Z[3] = log[Z[3]]; -} - -inline void IDEA::Base::LookupMUL(IDEA::Word &a, IDEA::Word b) -{ - a = antilog[low16(log[low16(a)]+b)]; -} -#endif // IDEA_LARGECACHE - -void IDEA::Base::UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &) -{ - AssertValidKeyLength(length); - -#ifdef IDEA_LARGECACHE - BuildLogTables(); -#endif - - EnKey(userKey); - - if (!IsForwardTransformation()) - DeKey(); - -#ifdef IDEA_LARGECACHE - LookupKeyLogs(); -#endif -} - -void IDEA::Base::EnKey (const byte *userKey) -{ - unsigned int i; - - for (i=0; i<8; i++) - m_key[i] = ((IDEA::Word)userKey[2*i]<<8) | userKey[2*i+1]; - - for (; i<IDEA_KEYLEN; i++) - { - unsigned int j = RoundDownToMultipleOf(i,8U)-8; - m_key[i] = low16((m_key[j+(i+1)%8] << 9) | (m_key[j+(i+2)%8] >> 7)); - } -} - -static IDEA::Word MulInv(IDEA::Word x) -{ - IDEA::Word y=x; - for (unsigned i=0; i<15; i++) - { - DirectMUL(y,low16(y)); - DirectMUL(y,x); - } - return low16(y); -} - -static inline IDEA::Word AddInv(IDEA::Word x) -{ - return low16(0-x); -} - -void IDEA::Base::DeKey() -{ - FixedSizeSecBlock<IDEA::Word, 6*ROUNDS+4> tempkey; - size_t i; - - for (i=0; i<ROUNDS; i++) - { - tempkey[i*6+0] = MulInv(m_key[(ROUNDS-i)*6+0]); - tempkey[i*6+1] = AddInv(m_key[(ROUNDS-i)*6+1+(i>0)]); - tempkey[i*6+2] = AddInv(m_key[(ROUNDS-i)*6+2-(i>0)]); - tempkey[i*6+3] = MulInv(m_key[(ROUNDS-i)*6+3]); - tempkey[i*6+4] = m_key[(ROUNDS-1-i)*6+4]; - tempkey[i*6+5] = m_key[(ROUNDS-1-i)*6+5]; - } - - tempkey[i*6+0] = MulInv(m_key[(ROUNDS-i)*6+0]); - tempkey[i*6+1] = AddInv(m_key[(ROUNDS-i)*6+1]); - tempkey[i*6+2] = AddInv(m_key[(ROUNDS-i)*6+2]); - tempkey[i*6+3] = MulInv(m_key[(ROUNDS-i)*6+3]); - - m_key = tempkey; -} - -#ifdef IDEA_LARGECACHE -#define MUL(a,b) LookupMUL(a,b) -#else -#define MUL(a,b) DirectMUL(a,b) -#endif - -void IDEA::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - typedef BlockGetAndPut<word16, BigEndian> Block; - - const IDEA::Word *key = m_key; - IDEA::Word x0,x1,x2,x3,t0,t1; - Block::Get(inBlock)(x0)(x1)(x2)(x3); - - for (unsigned int i=0; i<ROUNDS; i++) - { - MUL(x0, key[i*6+0]); - x1 += key[i*6+1]; - x2 += key[i*6+2]; - MUL(x3, key[i*6+3]); - t0 = x0^x2; - MUL(t0, key[i*6+4]); - t1 = t0 + (x1^x3); - MUL(t1, key[i*6+5]); - t0 += t1; - x0 ^= t1; - x3 ^= t0; - t0 ^= x1; - x1 = x2^t1; - x2 = t0; - } - - MUL(x0, key[ROUNDS*6+0]); - x2 += key[ROUNDS*6+1]; - x1 += key[ROUNDS*6+2]; - MUL(x3, key[ROUNDS*6+3]); - - Block::Put(xorBlock, outBlock)(x0)(x2)(x1)(x3); -} - -NAMESPACE_END diff --git a/CryptoPP/idea.h b/CryptoPP/idea.h deleted file mode 100644 index 2ab5713ad..000000000 --- a/CryptoPP/idea.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef CRYPTOPP_IDEA_H -#define CRYPTOPP_IDEA_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct IDEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public FixedRounds<8> -{ - static const char *StaticAlgorithmName() {return "IDEA";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#IDEA">IDEA</a> -class IDEA : public IDEA_Info, public BlockCipherDocumentation -{ -public: // made public for internal purposes -#ifdef CRYPTOPP_NATIVE_DWORD_AVAILABLE - typedef word Word; -#else - typedef hword Word; -#endif - -private: - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<IDEA_Info> - { - public: - unsigned int OptimalDataAlignment() const {return 2;} - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - private: - void EnKey(const byte *); - void DeKey(); - FixedSizeSecBlock<Word, 6*ROUNDS+4> m_key; - - #ifdef IDEA_LARGECACHE - static inline void LookupMUL(word &a, word b); - void LookupKeyLogs(); - static void BuildLogTables(); - static volatile bool tablesBuilt; - static word16 log[0x10000], antilog[0x10000]; - #endif - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Base> Encryption; - typedef BlockCipherFinal<DECRYPTION, Base> Decryption; -}; - -typedef IDEA::Encryption IDEAEncryption; -typedef IDEA::Decryption IDEADecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/mars.cpp b/CryptoPP/mars.cpp deleted file mode 100644 index fe9b1186a..000000000 --- a/CryptoPP/mars.cpp +++ /dev/null @@ -1,154 +0,0 @@ -// mars.cpp - written and placed in the public domain by Wei Dai - -// includes IBM's key setup "tweak" proposed in August 1999 (http://www.research.ibm.com/security/key-setup.txt) - -#include "pch.h" -#include "mars.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -void MARS::Base::UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &) -{ - AssertValidKeyLength(length); - - // Initialize T[] with the key data - FixedSizeSecBlock<word32, 15> T; - GetUserKey(LITTLE_ENDIAN_ORDER, T.begin(), 15, userKey, length); - T[length/4] = length/4; - - for (unsigned int j=0; j<4; j++) // compute 10 words of K[] in each iteration - { - unsigned int i; - // Do linear transformation - for (i=0; i<15; i++) - T[i] = T[i] ^ rotlFixed(T[(i+8)%15] ^ T[(i+13)%15], 3) ^ (4*i+j); - - // Do four rounds of stirring - for (unsigned int k=0; k<4; k++) - for (i=0; i<15; i++) - T[i] = rotlFixed(T[i] + Sbox[T[(i+14)%15]%512], 9); - - // Store next 10 key words into K[] - for (i=0; i<10; i++) - m_k[10*j+i] = T[4*i%15]; - } - - // Modify multiplication key-words - for(unsigned int i = 5; i < 37; i += 2) - { - word32 m, w = m_k[i] | 3; - m = (~w ^ (w<<1)) & (~w ^ (w>>1)) & 0x7ffffffe; - m &= m>>1; m &= m>>2; m &= m>>4; - m |= m<<1; m |= m<<2; m |= m<<4; - m &= 0x7ffffffc; - w ^= rotlMod(Sbox[265 + (m_k[i] & 3)], m_k[i-1]) & m; - m_k[i] = w; - } -} - -#define S(a) Sbox[(a)&0x1ff] -#define S0(a) Sbox[(a)&0xff] -#define S1(a) Sbox[((a)&0xff) + 256] - -typedef BlockGetAndPut<word32, LittleEndian> Block; - -void MARS::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - unsigned int i; - word32 a, b, c, d, l, m, r, t; - const word32 *k = m_k; - - Block::Get(inBlock)(a)(b)(c)(d); - - a += k[0]; b += k[1]; c += k[2]; d += k[3]; - - for (i=0; i<8; i++) - { - b = (b ^ S0(a)) + S1(a>>8); - c += S0(a>>16); - a = rotrFixed(a, 24); - d ^= S1(a); - a += (i%4==0) ? d : 0; - a += (i%4==1) ? b : 0; - t = a; a = b; b = c; c = d; d = t; - } - - for (i=0; i<16; i++) - { - t = rotlFixed(a, 13); - r = rotlFixed(t * k[2*i+5], 10); - m = a + k[2*i+4]; - l = rotlMod((S(m) ^ rotrFixed(r, 5) ^ r), r); - c += rotlMod(m, rotrFixed(r, 5)); - (i<8 ? b : d) += l; - (i<8 ? d : b) ^= r; - a = b; b = c; c = d; d = t; - } - - for (i=0; i<8; i++) - { - a -= (i%4==2) ? d : 0; - a -= (i%4==3) ? b : 0; - b ^= S1(a); - c -= S0(a>>24); - t = rotlFixed(a, 24); - d = (d - S1(a>>16)) ^ S0(t); - a = b; b = c; c = d; d = t; - } - - a -= k[36]; b -= k[37]; c -= k[38]; d -= k[39]; - - Block::Put(xorBlock, outBlock)(a)(b)(c)(d); -} - -void MARS::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - unsigned int i; - word32 a, b, c, d, l, m, r, t; - const word32 *k = m_k; - - Block::Get(inBlock)(d)(c)(b)(a); - - d += k[36]; c += k[37]; b += k[38]; a += k[39]; - - for (i=0; i<8; i++) - { - b = (b ^ S0(a)) + S1(a>>8); - c += S0(a>>16); - a = rotrFixed(a, 24); - d ^= S1(a); - a += (i%4==0) ? d : 0; - a += (i%4==1) ? b : 0; - t = a; a = b; b = c; c = d; d = t; - } - - for (i=0; i<16; i++) - { - t = rotrFixed(a, 13); - r = rotlFixed(a * k[35-2*i], 10); - m = t + k[34-2*i]; - l = rotlMod((S(m) ^ rotrFixed(r, 5) ^ r), r); - c -= rotlMod(m, rotrFixed(r, 5)); - (i<8 ? b : d) -= l; - (i<8 ? d : b) ^= r; - a = b; b = c; c = d; d = t; - } - - for (i=0; i<8; i++) - { - a -= (i%4==2) ? d : 0; - a -= (i%4==3) ? b : 0; - b ^= S1(a); - c -= S0(a>>24); - t = rotlFixed(a, 24); - d = (d - S1(a>>16)) ^ S0(t); - a = b; b = c; c = d; d = t; - } - - d -= k[0]; c -= k[1]; b -= k[2]; a -= k[3]; - - Block::Put(xorBlock, outBlock)(d)(c)(b)(a); -} - -NAMESPACE_END diff --git a/CryptoPP/mars.h b/CryptoPP/mars.h deleted file mode 100644 index 414adf42d..000000000 --- a/CryptoPP/mars.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef CRYPTOPP_MARS_H -#define CRYPTOPP_MARS_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct MARS_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 16, 56, 4> -{ - static const char *StaticAlgorithmName() {return "MARS";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#MARS">MARS</a> -class MARS : public MARS_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<MARS_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - static const word32 Sbox[512]; - - FixedSizeSecBlock<word32, 40> m_k; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef MARS::Encryption MARSEncryption; -typedef MARS::Decryption MARSDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/marss.cpp b/CryptoPP/marss.cpp deleted file mode 100644 index 7c38f146c..000000000 --- a/CryptoPP/marss.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// MARS S-Box - -#include "pch.h" -#include "mars.h" - -NAMESPACE_BEGIN(CryptoPP) - -const word32 MARS::Base::Sbox[512] = { - 0x09d0c479, 0x28c8ffe0, 0x84aa6c39, 0x9dad7287, - 0x7dff9be3, 0xd4268361, 0xc96da1d4, 0x7974cc93, - 0x85d0582e, 0x2a4b5705, 0x1ca16a62, 0xc3bd279d, - 0x0f1f25e5, 0x5160372f, 0xc695c1fb, 0x4d7ff1e4, - 0xae5f6bf4, 0x0d72ee46, 0xff23de8a, 0xb1cf8e83, - 0xf14902e2, 0x3e981e42, 0x8bf53eb6, 0x7f4bf8ac, - 0x83631f83, 0x25970205, 0x76afe784, 0x3a7931d4, - 0x4f846450, 0x5c64c3f6, 0x210a5f18, 0xc6986a26, - 0x28f4e826, 0x3a60a81c, 0xd340a664, 0x7ea820c4, - 0x526687c5, 0x7eddd12b, 0x32a11d1d, 0x9c9ef086, - 0x80f6e831, 0xab6f04ad, 0x56fb9b53, 0x8b2e095c, - 0xb68556ae, 0xd2250b0d, 0x294a7721, 0xe21fb253, - 0xae136749, 0xe82aae86, 0x93365104, 0x99404a66, - 0x78a784dc, 0xb69ba84b, 0x04046793, 0x23db5c1e, - 0x46cae1d6, 0x2fe28134, 0x5a223942, 0x1863cd5b, - 0xc190c6e3, 0x07dfb846, 0x6eb88816, 0x2d0dcc4a, - 0xa4ccae59, 0x3798670d, 0xcbfa9493, 0x4f481d45, - 0xeafc8ca8, 0xdb1129d6, 0xb0449e20, 0x0f5407fb, - 0x6167d9a8, 0xd1f45763, 0x4daa96c3, 0x3bec5958, - 0xababa014, 0xb6ccd201, 0x38d6279f, 0x02682215, - 0x8f376cd5, 0x092c237e, 0xbfc56593, 0x32889d2c, - 0x854b3e95, 0x05bb9b43, 0x7dcd5dcd, 0xa02e926c, - 0xfae527e5, 0x36a1c330, 0x3412e1ae, 0xf257f462, - 0x3c4f1d71, 0x30a2e809, 0x68e5f551, 0x9c61ba44, - 0x5ded0ab8, 0x75ce09c8, 0x9654f93e, 0x698c0cca, - 0x243cb3e4, 0x2b062b97, 0x0f3b8d9e, 0x00e050df, - 0xfc5d6166, 0xe35f9288, 0xc079550d, 0x0591aee8, - 0x8e531e74, 0x75fe3578, 0x2f6d829a, 0xf60b21ae, - 0x95e8eb8d, 0x6699486b, 0x901d7d9b, 0xfd6d6e31, - 0x1090acef, 0xe0670dd8, 0xdab2e692, 0xcd6d4365, - 0xe5393514, 0x3af345f0, 0x6241fc4d, 0x460da3a3, - 0x7bcf3729, 0x8bf1d1e0, 0x14aac070, 0x1587ed55, - 0x3afd7d3e, 0xd2f29e01, 0x29a9d1f6, 0xefb10c53, - 0xcf3b870f, 0xb414935c, 0x664465ed, 0x024acac7, - 0x59a744c1, 0x1d2936a7, 0xdc580aa6, 0xcf574ca8, - 0x040a7a10, 0x6cd81807, 0x8a98be4c, 0xaccea063, - 0xc33e92b5, 0xd1e0e03d, 0xb322517e, 0x2092bd13, - 0x386b2c4a, 0x52e8dd58, 0x58656dfb, 0x50820371, - 0x41811896, 0xe337ef7e, 0xd39fb119, 0xc97f0df6, - 0x68fea01b, 0xa150a6e5, 0x55258962, 0xeb6ff41b, - 0xd7c9cd7a, 0xa619cd9e, 0xbcf09576, 0x2672c073, - 0xf003fb3c, 0x4ab7a50b, 0x1484126a, 0x487ba9b1, - 0xa64fc9c6, 0xf6957d49, 0x38b06a75, 0xdd805fcd, - 0x63d094cf, 0xf51c999e, 0x1aa4d343, 0xb8495294, - 0xce9f8e99, 0xbffcd770, 0xc7c275cc, 0x378453a7, - 0x7b21be33, 0x397f41bd, 0x4e94d131, 0x92cc1f98, - 0x5915ea51, 0x99f861b7, 0xc9980a88, 0x1d74fd5f, - 0xb0a495f8, 0x614deed0, 0xb5778eea, 0x5941792d, - 0xfa90c1f8, 0x33f824b4, 0xc4965372, 0x3ff6d550, - 0x4ca5fec0, 0x8630e964, 0x5b3fbbd6, 0x7da26a48, - 0xb203231a, 0x04297514, 0x2d639306, 0x2eb13149, - 0x16a45272, 0x532459a0, 0x8e5f4872, 0xf966c7d9, - 0x07128dc0, 0x0d44db62, 0xafc8d52d, 0x06316131, - 0xd838e7ce, 0x1bc41d00, 0x3a2e8c0f, 0xea83837e, - 0xb984737d, 0x13ba4891, 0xc4f8b949, 0xa6d6acb3, - 0xa215cdce, 0x8359838b, 0x6bd1aa31, 0xf579dd52, - 0x21b93f93, 0xf5176781, 0x187dfdde, 0xe94aeb76, - 0x2b38fd54, 0x431de1da, 0xab394825, 0x9ad3048f, - 0xdfea32aa, 0x659473e3, 0x623f7863, 0xf3346c59, - 0xab3ab685, 0x3346a90b, 0x6b56443e, 0xc6de01f8, - 0x8d421fc0, 0x9b0ed10c, 0x88f1a1e9, 0x54c1f029, - 0x7dead57b, 0x8d7ba426, 0x4cf5178a, 0x551a7cca, - 0x1a9a5f08, 0xfcd651b9, 0x25605182, 0xe11fc6c3, - 0xb6fd9676, 0x337b3027, 0xb7c8eb14, 0x9e5fd030, - 0x6b57e354, 0xad913cf7, 0x7e16688d, 0x58872a69, - 0x2c2fc7df, 0xe389ccc6, 0x30738df1, 0x0824a734, - 0xe1797a8b, 0xa4a8d57b, 0x5b5d193b, 0xc8a8309b, - 0x73f9a978, 0x73398d32, 0x0f59573e, 0xe9df2b03, - 0xe8a5b6c8, 0x848d0704, 0x98df93c2, 0x720a1dc3, - 0x684f259a, 0x943ba848, 0xa6370152, 0x863b5ea3, - 0xd17b978b, 0x6d9b58ef, 0x0a700dd4, 0xa73d36bf, - 0x8e6a0829, 0x8695bc14, 0xe35b3447, 0x933ac568, - 0x8894b022, 0x2f511c27, 0xddfbcc3c, 0x006662b6, - 0x117c83fe, 0x4e12b414, 0xc2bca766, 0x3a2fec10, - 0xf4562420, 0x55792e2a, 0x46f5d857, 0xceda25ce, - 0xc3601d3b, 0x6c00ab46, 0xefac9c28, 0xb3c35047, - 0x611dfee3, 0x257c3207, 0xfdd58482, 0x3b14d84f, - 0x23becb64, 0xa075f3a3, 0x088f8ead, 0x07adf158, - 0x7796943c, 0xfacabf3d, 0xc09730cd, 0xf7679969, - 0xda44e9ed, 0x2c854c12, 0x35935fa3, 0x2f057d9f, - 0x690624f8, 0x1cb0bafd, 0x7b0dbdc6, 0x810f23bb, - 0xfa929a1a, 0x6d969a17, 0x6742979b, 0x74ac7d05, - 0x010e65c4, 0x86a3d963, 0xf907b5a0, 0xd0042bd3, - 0x158d7d03, 0x287a8255, 0xbba8366f, 0x096edc33, - 0x21916a7b, 0x77b56b86, 0x951622f9, 0xa6c5e650, - 0x8cea17d1, 0xcd8c62bc, 0xa3d63433, 0x358a68fd, - 0x0f9b9d3c, 0xd6aa295b, 0xfe33384a, 0xc000738e, - 0xcd67eb2f, 0xe2eb6dc2, 0x97338b02, 0x06c9f246, - 0x419cf1ad, 0x2b83c045, 0x3723f18a, 0xcb5b3089, - 0x160bead7, 0x5d494656, 0x35f8a74b, 0x1e4e6c9e, - 0x000399bd, 0x67466880, 0xb4174831, 0xacf423b2, - 0xca815ab3, 0x5a6395e7, 0x302a67c5, 0x8bdb446b, - 0x108f8fa4, 0x10223eda, 0x92b8b48b, 0x7f38d0ee, - 0xab2701d4, 0x0262d415, 0xaf224a30, 0xb3d88aba, - 0xf8b2c3af, 0xdaf7ef70, 0xcc97d3b7, 0xe9614b6c, - 0x2baebff4, 0x70f687cf, 0x386c9156, 0xce092ee5, - 0x01e87da6, 0x6ce91e6a, 0xbb7bcc84, 0xc7922c20, - 0x9d3b71fd, 0x060e41c6, 0xd7590f15, 0x4e03bb47, - 0x183c198e, 0x63eeb240, 0x2ddbf49a, 0x6d5cba54, - 0x923750af, 0xf9e14236, 0x7838162b, 0x59726c72, - 0x81b66760, 0xbb2926c1, 0x48a0ce0d, 0xa6c0496d, - 0xad43507b, 0x718d496a, 0x9df057af, 0x44b1bde6, - 0x054356dc, 0xde7ced35, 0xd51a138b, 0x62088cc9, - 0x35830311, 0xc96efca2, 0x686f86ec, 0x8e77cb68, - 0x63e1d6b8, 0xc80f9778, 0x79c491fd, 0x1b4c67f2, - 0x72698d7d, 0x5e368c31, 0xf7d95e2e, 0xa1d3493f, - 0xdcd9433e, 0x896f1552, 0x4bc4ca7a, 0xa6d1baf4, - 0xa5a96dcc, 0x0bef8b46, 0xa169fda7, 0x74df40b7, - 0x4e208804, 0x9a756607, 0x038e87c8, 0x20211e44, - 0x8b7ad4bf, 0xc6403f35, 0x1848e36d, 0x80bdb038, - 0x1e62891c, 0x643d2107, 0xbf04d6f8, 0x21092c8c, - 0xf644f389, 0x0778404e, 0x7b78adb8, 0xa2c52d53, - 0x42157abe, 0xa2253e2e, 0x7bf3f4ae, 0x80f594f9, - 0x953194e7, 0x77eb92ed, 0xb3816930, 0xda8d9336, - 0xbf447469, 0xf26d9483, 0xee6faed5, 0x71371235, - 0xde425f73, 0xb4e59f43, 0x7dbe2d4e, 0x2d37b185, - 0x49dc9a63, 0x98c39d98, 0x1301c9a2, 0x389b1bbf, - 0x0c18588d, 0xa421c1ba, 0x7aa3865c, 0x71e08558, - 0x3c5cfcaa, 0x7d239ca4, 0x0297d9dd, 0xd7dc2830, - 0x4b37802b, 0x7428ab54, 0xaeee0347, 0x4b3fbb85, - 0x692f2f08, 0x134e578e, 0x36d9e0bf, 0xae8b5fcf, - 0xedb93ecf, 0x2b27248e, 0x170eb1ef, 0x7dc57fd6, - 0x1e760f16, 0xb1136601, 0x864e1b9b, 0xd7ea7319, - 0x3ab871bd, 0xcfa4d76f, 0xe31bd782, 0x0dbeb469, - 0xabb96061, 0x5370f85d, 0xffb07e37, 0xda30d0fb, - 0xebc977b6, 0x0b98b40f, 0x3a4d0fe6, 0xdf4fc26b, - 0x159cf22a, 0xc298d6e2, 0x2b78ef6a, 0x61a94ac0, - 0xab561187, 0x14eea0f0, 0xdf0d4164, 0x19af70ee -}; - -NAMESPACE_END diff --git a/CryptoPP/rc2.cpp b/CryptoPP/rc2.cpp deleted file mode 100644 index 48df2ef45..000000000 --- a/CryptoPP/rc2.cpp +++ /dev/null @@ -1,118 +0,0 @@ -// rc2.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "rc2.h" -#include "misc.h" -#include "argnames.h" - -NAMESPACE_BEGIN(CryptoPP) - -void RC2::Base::UncheckedSetKey(const byte *key, unsigned int keyLen, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(keyLen); - - int effectiveLen = params.GetIntValueWithDefault(Name::EffectiveKeyLength(), DEFAULT_EFFECTIVE_KEYLENGTH); - if (effectiveLen > MAX_EFFECTIVE_KEYLENGTH) - throw InvalidArgument("RC2: effective key length parameter exceeds maximum"); - - static const unsigned char PITABLE[256] = { - 217,120,249,196, 25,221,181,237, 40,233,253,121, 74,160,216,157, - 198,126, 55,131, 43,118, 83,142, 98, 76,100,136, 68,139,251,162, - 23,154, 89,245,135,179, 79, 19, 97, 69,109,141, 9,129,125, 50, - 189,143, 64,235,134,183,123, 11,240,149, 33, 34, 92,107, 78,130, - 84,214,101,147,206, 96,178, 28,115, 86,192, 20,167,140,241,220, - 18,117,202, 31, 59,190,228,209, 66, 61,212, 48,163, 60,182, 38, - 111,191, 14,218, 70,105, 7, 87, 39,242, 29,155,188,148, 67, 3, - 248, 17,199,246,144,239, 62,231, 6,195,213, 47,200,102, 30,215, - 8,232,234,222,128, 82,238,247,132,170,114,172, 53, 77,106, 42, - 150, 26,210,113, 90, 21, 73,116, 75,159,208, 94, 4, 24,164,236, - 194,224, 65,110, 15, 81,203,204, 36,145,175, 80,161,244,112, 57, - 153,124, 58,133, 35,184,180,122,252, 2, 54, 91, 37, 85,151, 49, - 45, 93,250,152,227,138,146,174, 5,223, 41, 16,103,108,186,201, - 211, 0,230,207,225,158,168, 44, 99, 22, 1, 63, 88,226,137,169, - 13, 56, 52, 27,171, 51,255,176,187, 72, 12, 95,185,177,205, 46, - 197,243,219, 71,229,165,156,119, 10,166, 32,104,254,127,193,173}; - - SecByteBlock L(128); - memcpy(L, key, keyLen); - - int i; - for (i=keyLen; i<128; i++) - L[i] = PITABLE[(L[i-1] + L[i-keyLen]) & 255]; - - unsigned int T8 = (effectiveLen+7) / 8; - byte TM = 255 >> ((8-(effectiveLen%8))%8); - L[128-T8] = PITABLE[L[128-T8] & TM]; - - for (i=127-T8; i>=0; i--) - L[i] = PITABLE[L[i+1] ^ L[i+T8]]; - - for (i=0; i<64; i++) - K[i] = L[2*i] + (L[2*i+1] << 8); -} - -typedef BlockGetAndPut<word16, LittleEndian> Block; - -void RC2::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word16 R0, R1, R2, R3; - Block::Get(inBlock)(R0)(R1)(R2)(R3); - - for (int i = 0; i < 16; i++) - { - R0 += (R1 & ~R3) + (R2 & R3) + K[4*i+0]; - R0 = rotlFixed(R0, 1); - - R1 += (R2 & ~R0) + (R3 & R0) + K[4*i+1]; - R1 = rotlFixed(R1, 2); - - R2 += (R3 & ~R1) + (R0 & R1) + K[4*i+2]; - R2 = rotlFixed(R2, 3); - - R3 += (R0 & ~R2) + (R1 & R2) + K[4*i+3]; - R3 = rotlFixed(R3, 5); - - if (i == 4 || i == 10) - { - R0 += K[R3 & 63]; - R1 += K[R0 & 63]; - R2 += K[R1 & 63]; - R3 += K[R2 & 63]; - } - } - - Block::Put(xorBlock, outBlock)(R0)(R1)(R2)(R3); -} - -void RC2::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word16 R0, R1, R2, R3; - Block::Get(inBlock)(R0)(R1)(R2)(R3); - - for (int i = 15; i >= 0; i--) - { - if (i == 4 || i == 10) - { - R3 -= K[R2 & 63]; - R2 -= K[R1 & 63]; - R1 -= K[R0 & 63]; - R0 -= K[R3 & 63]; - } - - R3 = rotrFixed(R3, 5); - R3 -= (R0 & ~R2) + (R1 & R2) + K[4*i+3]; - - R2 = rotrFixed(R2, 3); - R2 -= (R3 & ~R1) + (R0 & R1) + K[4*i+2]; - - R1 = rotrFixed(R1, 2); - R1 -= (R2 & ~R0) + (R3 & R0) + K[4*i+1]; - - R0 = rotrFixed(R0, 1); - R0 -= (R1 & ~R3) + (R2 & R3) + K[4*i+0]; - } - - Block::Put(xorBlock, outBlock)(R0)(R1)(R2)(R3); -} - -NAMESPACE_END diff --git a/CryptoPP/rc2.h b/CryptoPP/rc2.h deleted file mode 100644 index ebff798fc..000000000 --- a/CryptoPP/rc2.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef CRYPTOPP_RC2_H -#define CRYPTOPP_RC2_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" -#include "algparam.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128> -{ - CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024) - CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024) - static const char *StaticAlgorithmName() {return "RC2";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC2">RC2</a> -class RC2 : public RC2_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC2_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - unsigned int OptimalDataAlignment() const {return GetAlignmentOf<word16>();} - - protected: - FixedSizeSecBlock<word16, 64> K; // expanded key table - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - class Encryption : public BlockCipherFinal<ENCRYPTION, Enc> - { - public: - Encryption() {} - Encryption(const byte *key, size_t keyLen=DEFAULT_KEYLENGTH) - {SetKey(key, keyLen);} - Encryption(const byte *key, size_t keyLen, int effectiveKeyLen) - {SetKey(key, keyLen, MakeParameters("EffectiveKeyLength", effectiveKeyLen));} - }; - - class Decryption : public BlockCipherFinal<DECRYPTION, Dec> - { - public: - Decryption() {} - Decryption(const byte *key, size_t keyLen=DEFAULT_KEYLENGTH) - {SetKey(key, keyLen);} - Decryption(const byte *key, size_t keyLen, int effectiveKeyLen) - {SetKey(key, keyLen, MakeParameters("EffectiveKeyLength", effectiveKeyLen));} - }; -}; - -typedef RC2::Encryption RC2Encryption; -typedef RC2::Decryption RC2Decryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/rc5.cpp b/CryptoPP/rc5.cpp deleted file mode 100644 index 2b730def7..000000000 --- a/CryptoPP/rc5.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// rc5.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "rc5.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -void RC5::Base::UncheckedSetKey(const byte *k, unsigned int keylen, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(keylen); - - r = GetRoundsAndThrowIfInvalid(params, this); - sTable.New(2*(r+1)); - - static const RC5_WORD MAGIC_P = 0xb7e15163L; // magic constant P for wordsize - static const RC5_WORD MAGIC_Q = 0x9e3779b9L; // magic constant Q for wordsize - static const int U=sizeof(RC5_WORD); - - const unsigned int c = STDMAX((keylen+U-1)/U, 1U); // RC6 paper says c=1 if keylen==0 - SecBlock<RC5_WORD> l(c); - - GetUserKey(LITTLE_ENDIAN_ORDER, l.begin(), c, k, keylen); - - sTable[0] = MAGIC_P; - for (unsigned j=1; j<sTable.size();j++) - sTable[j] = sTable[j-1] + MAGIC_Q; - - RC5_WORD a=0, b=0; - const unsigned n = 3*STDMAX((unsigned int)sTable.size(), c); - - for (unsigned h=0; h < n; h++) - { - a = sTable[h % sTable.size()] = rotlFixed((sTable[h % sTable.size()] + a + b), 3); - b = l[h % c] = rotlMod((l[h % c] + a + b), (a+b)); - } -} - -typedef BlockGetAndPut<RC5::RC5_WORD, LittleEndian> Block; - -void RC5::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - const RC5_WORD *sptr = sTable; - RC5_WORD a, b; - - Block::Get(inBlock)(a)(b); - a += sptr[0]; - b += sptr[1]; - sptr += 2; - - for(unsigned i=0; i<r; i++) - { - a = rotlMod(a^b,b) + sptr[2*i+0]; - b = rotlMod(a^b,a) + sptr[2*i+1]; - } - - Block::Put(xorBlock, outBlock)(a)(b); -} - -void RC5::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - const RC5_WORD *sptr = sTable.end(); - RC5_WORD a, b; - - Block::Get(inBlock)(a)(b); - - for (unsigned i=0; i<r; i++) - { - sptr-=2; - b = rotrMod(b-sptr[1], a) ^ a; - a = rotrMod(a-sptr[0], b) ^ b; - } - b -= sTable[1]; - a -= sTable[0]; - - Block::Put(xorBlock, outBlock)(a)(b); -} - -NAMESPACE_END diff --git a/CryptoPP/rc5.h b/CryptoPP/rc5.h deleted file mode 100644 index f842a9bdf..000000000 --- a/CryptoPP/rc5.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef CRYPTOPP_RC5_H -#define CRYPTOPP_RC5_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct RC5_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 0, 255>, public VariableRounds<16> -{ - static const char *StaticAlgorithmName() {return "RC5";} - typedef word32 RC5_WORD; -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC5">RC5</a> -class RC5 : public RC5_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC5_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - unsigned int r; // number of rounds - SecBlock<RC5_WORD> sTable; // expanded key table - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef RC5::Encryption RC5Encryption; -typedef RC5::Decryption RC5Decryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/rc6.cpp b/CryptoPP/rc6.cpp deleted file mode 100644 index e58cb6ac9..000000000 --- a/CryptoPP/rc6.cpp +++ /dev/null @@ -1,96 +0,0 @@ -// rc6.cpp - written and placed in the public domain by Sean Woods -// based on Wei Dai's RC5 code. - -#include "pch.h" -#include "rc6.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -void RC6::Base::UncheckedSetKey(const byte *k, unsigned int keylen, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(keylen); - - r = GetRoundsAndThrowIfInvalid(params, this); - sTable.New(2*(r+2)); - - static const RC6_WORD MAGIC_P = 0xb7e15163L; // magic constant P for wordsize - static const RC6_WORD MAGIC_Q = 0x9e3779b9L; // magic constant Q for wordsize - static const int U=sizeof(RC6_WORD); - - const unsigned int c = STDMAX((keylen+U-1)/U, 1U); // RC6 paper says c=1 if keylen==0 - SecBlock<RC6_WORD> l(c); - - GetUserKey(LITTLE_ENDIAN_ORDER, l.begin(), c, k, keylen); - - sTable[0] = MAGIC_P; - for (unsigned j=1; j<sTable.size();j++) - sTable[j] = sTable[j-1] + MAGIC_Q; - - RC6_WORD a=0, b=0; - const unsigned n = 3*STDMAX((unsigned int)sTable.size(), c); - - for (unsigned h=0; h < n; h++) - { - a = sTable[h % sTable.size()] = rotlFixed((sTable[h % sTable.size()] + a + b), 3); - b = l[h % c] = rotlMod((l[h % c] + a + b), (a+b)); - } -} - -typedef BlockGetAndPut<RC6::RC6_WORD, LittleEndian> Block; - -void RC6::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - const RC6_WORD *sptr = sTable; - RC6_WORD a, b, c, d, t, u; - - Block::Get(inBlock)(a)(b)(c)(d); - b += sptr[0]; - d += sptr[1]; - sptr += 2; - - for(unsigned i=0; i<r; i++) - { - t = rotlFixed(b*(2*b+1), 5); - u = rotlFixed(d*(2*d+1), 5); - a = rotlMod(a^t,u) + sptr[0]; - c = rotlMod(c^u,t) + sptr[1]; - t = a; a = b; b = c; c = d; d = t; - sptr += 2; - } - - a += sptr[0]; - c += sptr[1]; - - Block::Put(xorBlock, outBlock)(a)(b)(c)(d); -} - -void RC6::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - const RC6_WORD *sptr = sTable.end(); - RC6_WORD a, b, c, d, t, u; - - Block::Get(inBlock)(a)(b)(c)(d); - - sptr -= 2; - c -= sptr[1]; - a -= sptr[0]; - - for (unsigned i=0; i < r; i++) - { - sptr -= 2; - t = a; a = d; d = c; c = b; b = t; - u = rotlFixed(d*(2*d+1), 5); - t = rotlFixed(b*(2*b+1), 5); - c = rotrMod(c-sptr[1], t) ^ u; - a = rotrMod(a-sptr[0], u) ^ t; - } - - sptr -= 2; - d -= sTable[1]; - b -= sTable[0]; - - Block::Put(xorBlock, outBlock)(a)(b)(c)(d); -} - -NAMESPACE_END diff --git a/CryptoPP/rc6.h b/CryptoPP/rc6.h deleted file mode 100644 index df3d1ee4e..000000000 --- a/CryptoPP/rc6.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef CRYPTOPP_RC6_H -#define CRYPTOPP_RC6_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct RC6_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 255>, public VariableRounds<20> -{ - static const char *StaticAlgorithmName() {return "RC6";} - typedef word32 RC6_WORD; -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC6">RC6</a> -class RC6 : public RC6_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC6_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - unsigned int r; // number of rounds - SecBlock<RC6_WORD> sTable; // expanded key table - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef RC6::Encryption RC6Encryption; -typedef RC6::Decryption RC6Decryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/ripemd.cpp b/CryptoPP/ripemd.cpp deleted file mode 100644 index 3476aa8b5..000000000 --- a/CryptoPP/ripemd.cpp +++ /dev/null @@ -1,803 +0,0 @@ -// ripemd.cpp -// RIPEMD-160 written and placed in the public domain by Wei Dai -// RIPEMD-320, RIPEMD-128, RIPEMD-256 written by Kevin Springle -// and also placed in the public domain - -#include "pch.h" -#include "ripemd.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -#define F(x, y, z) (x ^ y ^ z) -#define G(x, y, z) (z ^ (x & (y^z))) -#define H(x, y, z) (z ^ (x | ~y)) -#define I(x, y, z) (y ^ (z & (x^y))) -#define J(x, y, z) (x ^ (y | ~z)) - -#define k0 0 -#define k1 0x5a827999UL -#define k2 0x6ed9eba1UL -#define k3 0x8f1bbcdcUL -#define k4 0xa953fd4eUL -#define k5 0x50a28be6UL -#define k6 0x5c4dd124UL -#define k7 0x6d703ef3UL -#define k8 0x7a6d76e9UL -#define k9 0 - -// ************************************************************* - -// for 160 and 320 -#define Subround(f, a, b, c, d, e, x, s, k) \ - a += f(b, c, d) + x + k;\ - a = rotlFixed((word32)a, s) + e;\ - c = rotlFixed((word32)c, 10U) - -void RIPEMD160::InitState(HashWordType *state) -{ - state[0] = 0x67452301L; - state[1] = 0xefcdab89L; - state[2] = 0x98badcfeL; - state[3] = 0x10325476L; - state[4] = 0xc3d2e1f0L; -} - -void RIPEMD160::Transform (word32 *digest, const word32 *X) -{ - unsigned long a1, b1, c1, d1, e1, a2, b2, c2, d2, e2; - a1 = a2 = digest[0]; - b1 = b2 = digest[1]; - c1 = c2 = digest[2]; - d1 = d2 = digest[3]; - e1 = e2 = digest[4]; - - Subround(F, a1, b1, c1, d1, e1, X[ 0], 11, k0); - Subround(F, e1, a1, b1, c1, d1, X[ 1], 14, k0); - Subround(F, d1, e1, a1, b1, c1, X[ 2], 15, k0); - Subround(F, c1, d1, e1, a1, b1, X[ 3], 12, k0); - Subround(F, b1, c1, d1, e1, a1, X[ 4], 5, k0); - Subround(F, a1, b1, c1, d1, e1, X[ 5], 8, k0); - Subround(F, e1, a1, b1, c1, d1, X[ 6], 7, k0); - Subround(F, d1, e1, a1, b1, c1, X[ 7], 9, k0); - Subround(F, c1, d1, e1, a1, b1, X[ 8], 11, k0); - Subround(F, b1, c1, d1, e1, a1, X[ 9], 13, k0); - Subround(F, a1, b1, c1, d1, e1, X[10], 14, k0); - Subround(F, e1, a1, b1, c1, d1, X[11], 15, k0); - Subround(F, d1, e1, a1, b1, c1, X[12], 6, k0); - Subround(F, c1, d1, e1, a1, b1, X[13], 7, k0); - Subround(F, b1, c1, d1, e1, a1, X[14], 9, k0); - Subround(F, a1, b1, c1, d1, e1, X[15], 8, k0); - - Subround(G, e1, a1, b1, c1, d1, X[ 7], 7, k1); - Subround(G, d1, e1, a1, b1, c1, X[ 4], 6, k1); - Subround(G, c1, d1, e1, a1, b1, X[13], 8, k1); - Subround(G, b1, c1, d1, e1, a1, X[ 1], 13, k1); - Subround(G, a1, b1, c1, d1, e1, X[10], 11, k1); - Subround(G, e1, a1, b1, c1, d1, X[ 6], 9, k1); - Subround(G, d1, e1, a1, b1, c1, X[15], 7, k1); - Subround(G, c1, d1, e1, a1, b1, X[ 3], 15, k1); - Subround(G, b1, c1, d1, e1, a1, X[12], 7, k1); - Subround(G, a1, b1, c1, d1, e1, X[ 0], 12, k1); - Subround(G, e1, a1, b1, c1, d1, X[ 9], 15, k1); - Subround(G, d1, e1, a1, b1, c1, X[ 5], 9, k1); - Subround(G, c1, d1, e1, a1, b1, X[ 2], 11, k1); - Subround(G, b1, c1, d1, e1, a1, X[14], 7, k1); - Subround(G, a1, b1, c1, d1, e1, X[11], 13, k1); - Subround(G, e1, a1, b1, c1, d1, X[ 8], 12, k1); - - Subround(H, d1, e1, a1, b1, c1, X[ 3], 11, k2); - Subround(H, c1, d1, e1, a1, b1, X[10], 13, k2); - Subround(H, b1, c1, d1, e1, a1, X[14], 6, k2); - Subround(H, a1, b1, c1, d1, e1, X[ 4], 7, k2); - Subround(H, e1, a1, b1, c1, d1, X[ 9], 14, k2); - Subround(H, d1, e1, a1, b1, c1, X[15], 9, k2); - Subround(H, c1, d1, e1, a1, b1, X[ 8], 13, k2); - Subround(H, b1, c1, d1, e1, a1, X[ 1], 15, k2); - Subround(H, a1, b1, c1, d1, e1, X[ 2], 14, k2); - Subround(H, e1, a1, b1, c1, d1, X[ 7], 8, k2); - Subround(H, d1, e1, a1, b1, c1, X[ 0], 13, k2); - Subround(H, c1, d1, e1, a1, b1, X[ 6], 6, k2); - Subround(H, b1, c1, d1, e1, a1, X[13], 5, k2); - Subround(H, a1, b1, c1, d1, e1, X[11], 12, k2); - Subround(H, e1, a1, b1, c1, d1, X[ 5], 7, k2); - Subround(H, d1, e1, a1, b1, c1, X[12], 5, k2); - - Subround(I, c1, d1, e1, a1, b1, X[ 1], 11, k3); - Subround(I, b1, c1, d1, e1, a1, X[ 9], 12, k3); - Subround(I, a1, b1, c1, d1, e1, X[11], 14, k3); - Subround(I, e1, a1, b1, c1, d1, X[10], 15, k3); - Subround(I, d1, e1, a1, b1, c1, X[ 0], 14, k3); - Subround(I, c1, d1, e1, a1, b1, X[ 8], 15, k3); - Subround(I, b1, c1, d1, e1, a1, X[12], 9, k3); - Subround(I, a1, b1, c1, d1, e1, X[ 4], 8, k3); - Subround(I, e1, a1, b1, c1, d1, X[13], 9, k3); - Subround(I, d1, e1, a1, b1, c1, X[ 3], 14, k3); - Subround(I, c1, d1, e1, a1, b1, X[ 7], 5, k3); - Subround(I, b1, c1, d1, e1, a1, X[15], 6, k3); - Subround(I, a1, b1, c1, d1, e1, X[14], 8, k3); - Subround(I, e1, a1, b1, c1, d1, X[ 5], 6, k3); - Subround(I, d1, e1, a1, b1, c1, X[ 6], 5, k3); - Subround(I, c1, d1, e1, a1, b1, X[ 2], 12, k3); - - Subround(J, b1, c1, d1, e1, a1, X[ 4], 9, k4); - Subround(J, a1, b1, c1, d1, e1, X[ 0], 15, k4); - Subround(J, e1, a1, b1, c1, d1, X[ 5], 5, k4); - Subround(J, d1, e1, a1, b1, c1, X[ 9], 11, k4); - Subround(J, c1, d1, e1, a1, b1, X[ 7], 6, k4); - Subround(J, b1, c1, d1, e1, a1, X[12], 8, k4); - Subround(J, a1, b1, c1, d1, e1, X[ 2], 13, k4); - Subround(J, e1, a1, b1, c1, d1, X[10], 12, k4); - Subround(J, d1, e1, a1, b1, c1, X[14], 5, k4); - Subround(J, c1, d1, e1, a1, b1, X[ 1], 12, k4); - Subround(J, b1, c1, d1, e1, a1, X[ 3], 13, k4); - Subround(J, a1, b1, c1, d1, e1, X[ 8], 14, k4); - Subround(J, e1, a1, b1, c1, d1, X[11], 11, k4); - Subround(J, d1, e1, a1, b1, c1, X[ 6], 8, k4); - Subround(J, c1, d1, e1, a1, b1, X[15], 5, k4); - Subround(J, b1, c1, d1, e1, a1, X[13], 6, k4); - - Subround(J, a2, b2, c2, d2, e2, X[ 5], 8, k5); - Subround(J, e2, a2, b2, c2, d2, X[14], 9, k5); - Subround(J, d2, e2, a2, b2, c2, X[ 7], 9, k5); - Subround(J, c2, d2, e2, a2, b2, X[ 0], 11, k5); - Subround(J, b2, c2, d2, e2, a2, X[ 9], 13, k5); - Subround(J, a2, b2, c2, d2, e2, X[ 2], 15, k5); - Subround(J, e2, a2, b2, c2, d2, X[11], 15, k5); - Subround(J, d2, e2, a2, b2, c2, X[ 4], 5, k5); - Subround(J, c2, d2, e2, a2, b2, X[13], 7, k5); - Subround(J, b2, c2, d2, e2, a2, X[ 6], 7, k5); - Subround(J, a2, b2, c2, d2, e2, X[15], 8, k5); - Subround(J, e2, a2, b2, c2, d2, X[ 8], 11, k5); - Subround(J, d2, e2, a2, b2, c2, X[ 1], 14, k5); - Subround(J, c2, d2, e2, a2, b2, X[10], 14, k5); - Subround(J, b2, c2, d2, e2, a2, X[ 3], 12, k5); - Subround(J, a2, b2, c2, d2, e2, X[12], 6, k5); - - Subround(I, e2, a2, b2, c2, d2, X[ 6], 9, k6); - Subround(I, d2, e2, a2, b2, c2, X[11], 13, k6); - Subround(I, c2, d2, e2, a2, b2, X[ 3], 15, k6); - Subround(I, b2, c2, d2, e2, a2, X[ 7], 7, k6); - Subround(I, a2, b2, c2, d2, e2, X[ 0], 12, k6); - Subround(I, e2, a2, b2, c2, d2, X[13], 8, k6); - Subround(I, d2, e2, a2, b2, c2, X[ 5], 9, k6); - Subround(I, c2, d2, e2, a2, b2, X[10], 11, k6); - Subround(I, b2, c2, d2, e2, a2, X[14], 7, k6); - Subround(I, a2, b2, c2, d2, e2, X[15], 7, k6); - Subround(I, e2, a2, b2, c2, d2, X[ 8], 12, k6); - Subround(I, d2, e2, a2, b2, c2, X[12], 7, k6); - Subround(I, c2, d2, e2, a2, b2, X[ 4], 6, k6); - Subround(I, b2, c2, d2, e2, a2, X[ 9], 15, k6); - Subround(I, a2, b2, c2, d2, e2, X[ 1], 13, k6); - Subround(I, e2, a2, b2, c2, d2, X[ 2], 11, k6); - - Subround(H, d2, e2, a2, b2, c2, X[15], 9, k7); - Subround(H, c2, d2, e2, a2, b2, X[ 5], 7, k7); - Subround(H, b2, c2, d2, e2, a2, X[ 1], 15, k7); - Subround(H, a2, b2, c2, d2, e2, X[ 3], 11, k7); - Subround(H, e2, a2, b2, c2, d2, X[ 7], 8, k7); - Subround(H, d2, e2, a2, b2, c2, X[14], 6, k7); - Subround(H, c2, d2, e2, a2, b2, X[ 6], 6, k7); - Subround(H, b2, c2, d2, e2, a2, X[ 9], 14, k7); - Subround(H, a2, b2, c2, d2, e2, X[11], 12, k7); - Subround(H, e2, a2, b2, c2, d2, X[ 8], 13, k7); - Subround(H, d2, e2, a2, b2, c2, X[12], 5, k7); - Subround(H, c2, d2, e2, a2, b2, X[ 2], 14, k7); - Subround(H, b2, c2, d2, e2, a2, X[10], 13, k7); - Subround(H, a2, b2, c2, d2, e2, X[ 0], 13, k7); - Subround(H, e2, a2, b2, c2, d2, X[ 4], 7, k7); - Subround(H, d2, e2, a2, b2, c2, X[13], 5, k7); - - Subround(G, c2, d2, e2, a2, b2, X[ 8], 15, k8); - Subround(G, b2, c2, d2, e2, a2, X[ 6], 5, k8); - Subround(G, a2, b2, c2, d2, e2, X[ 4], 8, k8); - Subround(G, e2, a2, b2, c2, d2, X[ 1], 11, k8); - Subround(G, d2, e2, a2, b2, c2, X[ 3], 14, k8); - Subround(G, c2, d2, e2, a2, b2, X[11], 14, k8); - Subround(G, b2, c2, d2, e2, a2, X[15], 6, k8); - Subround(G, a2, b2, c2, d2, e2, X[ 0], 14, k8); - Subround(G, e2, a2, b2, c2, d2, X[ 5], 6, k8); - Subround(G, d2, e2, a2, b2, c2, X[12], 9, k8); - Subround(G, c2, d2, e2, a2, b2, X[ 2], 12, k8); - Subround(G, b2, c2, d2, e2, a2, X[13], 9, k8); - Subround(G, a2, b2, c2, d2, e2, X[ 9], 12, k8); - Subround(G, e2, a2, b2, c2, d2, X[ 7], 5, k8); - Subround(G, d2, e2, a2, b2, c2, X[10], 15, k8); - Subround(G, c2, d2, e2, a2, b2, X[14], 8, k8); - - Subround(F, b2, c2, d2, e2, a2, X[12], 8, k9); - Subround(F, a2, b2, c2, d2, e2, X[15], 5, k9); - Subround(F, e2, a2, b2, c2, d2, X[10], 12, k9); - Subround(F, d2, e2, a2, b2, c2, X[ 4], 9, k9); - Subround(F, c2, d2, e2, a2, b2, X[ 1], 12, k9); - Subround(F, b2, c2, d2, e2, a2, X[ 5], 5, k9); - Subround(F, a2, b2, c2, d2, e2, X[ 8], 14, k9); - Subround(F, e2, a2, b2, c2, d2, X[ 7], 6, k9); - Subround(F, d2, e2, a2, b2, c2, X[ 6], 8, k9); - Subround(F, c2, d2, e2, a2, b2, X[ 2], 13, k9); - Subround(F, b2, c2, d2, e2, a2, X[13], 6, k9); - Subround(F, a2, b2, c2, d2, e2, X[14], 5, k9); - Subround(F, e2, a2, b2, c2, d2, X[ 0], 15, k9); - Subround(F, d2, e2, a2, b2, c2, X[ 3], 13, k9); - Subround(F, c2, d2, e2, a2, b2, X[ 9], 11, k9); - Subround(F, b2, c2, d2, e2, a2, X[11], 11, k9); - - c1 = digest[1] + c1 + d2; - digest[1] = digest[2] + d1 + e2; - digest[2] = digest[3] + e1 + a2; - digest[3] = digest[4] + a1 + b2; - digest[4] = digest[0] + b1 + c2; - digest[0] = c1; -} - -// ************************************************************* - -void RIPEMD320::InitState(HashWordType *state) -{ - state[0] = 0x67452301L; - state[1] = 0xefcdab89L; - state[2] = 0x98badcfeL; - state[3] = 0x10325476L; - state[4] = 0xc3d2e1f0L; - state[5] = 0x76543210L; - state[6] = 0xfedcba98L; - state[7] = 0x89abcdefL; - state[8] = 0x01234567L; - state[9] = 0x3c2d1e0fL; -} - -void RIPEMD320::Transform (word32 *digest, const word32 *X) -{ - unsigned long a1, b1, c1, d1, e1, a2, b2, c2, d2, e2, t; - a1 = digest[0]; - b1 = digest[1]; - c1 = digest[2]; - d1 = digest[3]; - e1 = digest[4]; - a2 = digest[5]; - b2 = digest[6]; - c2 = digest[7]; - d2 = digest[8]; - e2 = digest[9]; - - Subround(F, a1, b1, c1, d1, e1, X[ 0], 11, k0); - Subround(F, e1, a1, b1, c1, d1, X[ 1], 14, k0); - Subround(F, d1, e1, a1, b1, c1, X[ 2], 15, k0); - Subround(F, c1, d1, e1, a1, b1, X[ 3], 12, k0); - Subround(F, b1, c1, d1, e1, a1, X[ 4], 5, k0); - Subround(F, a1, b1, c1, d1, e1, X[ 5], 8, k0); - Subround(F, e1, a1, b1, c1, d1, X[ 6], 7, k0); - Subround(F, d1, e1, a1, b1, c1, X[ 7], 9, k0); - Subround(F, c1, d1, e1, a1, b1, X[ 8], 11, k0); - Subround(F, b1, c1, d1, e1, a1, X[ 9], 13, k0); - Subround(F, a1, b1, c1, d1, e1, X[10], 14, k0); - Subround(F, e1, a1, b1, c1, d1, X[11], 15, k0); - Subround(F, d1, e1, a1, b1, c1, X[12], 6, k0); - Subround(F, c1, d1, e1, a1, b1, X[13], 7, k0); - Subround(F, b1, c1, d1, e1, a1, X[14], 9, k0); - Subround(F, a1, b1, c1, d1, e1, X[15], 8, k0); - - Subround(J, a2, b2, c2, d2, e2, X[ 5], 8, k5); - Subround(J, e2, a2, b2, c2, d2, X[14], 9, k5); - Subround(J, d2, e2, a2, b2, c2, X[ 7], 9, k5); - Subround(J, c2, d2, e2, a2, b2, X[ 0], 11, k5); - Subround(J, b2, c2, d2, e2, a2, X[ 9], 13, k5); - Subround(J, a2, b2, c2, d2, e2, X[ 2], 15, k5); - Subround(J, e2, a2, b2, c2, d2, X[11], 15, k5); - Subround(J, d2, e2, a2, b2, c2, X[ 4], 5, k5); - Subround(J, c2, d2, e2, a2, b2, X[13], 7, k5); - Subround(J, b2, c2, d2, e2, a2, X[ 6], 7, k5); - Subround(J, a2, b2, c2, d2, e2, X[15], 8, k5); - Subround(J, e2, a2, b2, c2, d2, X[ 8], 11, k5); - Subround(J, d2, e2, a2, b2, c2, X[ 1], 14, k5); - Subround(J, c2, d2, e2, a2, b2, X[10], 14, k5); - Subround(J, b2, c2, d2, e2, a2, X[ 3], 12, k5); - Subround(J, a2, b2, c2, d2, e2, X[12], 6, k5); - - t = a1; a1 = a2; a2 = t; - - Subround(G, e1, a1, b1, c1, d1, X[ 7], 7, k1); - Subround(G, d1, e1, a1, b1, c1, X[ 4], 6, k1); - Subround(G, c1, d1, e1, a1, b1, X[13], 8, k1); - Subround(G, b1, c1, d1, e1, a1, X[ 1], 13, k1); - Subround(G, a1, b1, c1, d1, e1, X[10], 11, k1); - Subround(G, e1, a1, b1, c1, d1, X[ 6], 9, k1); - Subround(G, d1, e1, a1, b1, c1, X[15], 7, k1); - Subround(G, c1, d1, e1, a1, b1, X[ 3], 15, k1); - Subround(G, b1, c1, d1, e1, a1, X[12], 7, k1); - Subround(G, a1, b1, c1, d1, e1, X[ 0], 12, k1); - Subround(G, e1, a1, b1, c1, d1, X[ 9], 15, k1); - Subround(G, d1, e1, a1, b1, c1, X[ 5], 9, k1); - Subround(G, c1, d1, e1, a1, b1, X[ 2], 11, k1); - Subround(G, b1, c1, d1, e1, a1, X[14], 7, k1); - Subround(G, a1, b1, c1, d1, e1, X[11], 13, k1); - Subround(G, e1, a1, b1, c1, d1, X[ 8], 12, k1); - - Subround(I, e2, a2, b2, c2, d2, X[ 6], 9, k6); - Subround(I, d2, e2, a2, b2, c2, X[11], 13, k6); - Subround(I, c2, d2, e2, a2, b2, X[ 3], 15, k6); - Subround(I, b2, c2, d2, e2, a2, X[ 7], 7, k6); - Subround(I, a2, b2, c2, d2, e2, X[ 0], 12, k6); - Subround(I, e2, a2, b2, c2, d2, X[13], 8, k6); - Subround(I, d2, e2, a2, b2, c2, X[ 5], 9, k6); - Subround(I, c2, d2, e2, a2, b2, X[10], 11, k6); - Subround(I, b2, c2, d2, e2, a2, X[14], 7, k6); - Subround(I, a2, b2, c2, d2, e2, X[15], 7, k6); - Subround(I, e2, a2, b2, c2, d2, X[ 8], 12, k6); - Subround(I, d2, e2, a2, b2, c2, X[12], 7, k6); - Subround(I, c2, d2, e2, a2, b2, X[ 4], 6, k6); - Subround(I, b2, c2, d2, e2, a2, X[ 9], 15, k6); - Subround(I, a2, b2, c2, d2, e2, X[ 1], 13, k6); - Subround(I, e2, a2, b2, c2, d2, X[ 2], 11, k6); - - t = b1; b1 = b2; b2 = t; - - Subround(H, d1, e1, a1, b1, c1, X[ 3], 11, k2); - Subround(H, c1, d1, e1, a1, b1, X[10], 13, k2); - Subround(H, b1, c1, d1, e1, a1, X[14], 6, k2); - Subround(H, a1, b1, c1, d1, e1, X[ 4], 7, k2); - Subround(H, e1, a1, b1, c1, d1, X[ 9], 14, k2); - Subround(H, d1, e1, a1, b1, c1, X[15], 9, k2); - Subround(H, c1, d1, e1, a1, b1, X[ 8], 13, k2); - Subround(H, b1, c1, d1, e1, a1, X[ 1], 15, k2); - Subround(H, a1, b1, c1, d1, e1, X[ 2], 14, k2); - Subround(H, e1, a1, b1, c1, d1, X[ 7], 8, k2); - Subround(H, d1, e1, a1, b1, c1, X[ 0], 13, k2); - Subround(H, c1, d1, e1, a1, b1, X[ 6], 6, k2); - Subround(H, b1, c1, d1, e1, a1, X[13], 5, k2); - Subround(H, a1, b1, c1, d1, e1, X[11], 12, k2); - Subround(H, e1, a1, b1, c1, d1, X[ 5], 7, k2); - Subround(H, d1, e1, a1, b1, c1, X[12], 5, k2); - - Subround(H, d2, e2, a2, b2, c2, X[15], 9, k7); - Subround(H, c2, d2, e2, a2, b2, X[ 5], 7, k7); - Subround(H, b2, c2, d2, e2, a2, X[ 1], 15, k7); - Subround(H, a2, b2, c2, d2, e2, X[ 3], 11, k7); - Subround(H, e2, a2, b2, c2, d2, X[ 7], 8, k7); - Subround(H, d2, e2, a2, b2, c2, X[14], 6, k7); - Subround(H, c2, d2, e2, a2, b2, X[ 6], 6, k7); - Subround(H, b2, c2, d2, e2, a2, X[ 9], 14, k7); - Subround(H, a2, b2, c2, d2, e2, X[11], 12, k7); - Subround(H, e2, a2, b2, c2, d2, X[ 8], 13, k7); - Subround(H, d2, e2, a2, b2, c2, X[12], 5, k7); - Subround(H, c2, d2, e2, a2, b2, X[ 2], 14, k7); - Subround(H, b2, c2, d2, e2, a2, X[10], 13, k7); - Subround(H, a2, b2, c2, d2, e2, X[ 0], 13, k7); - Subround(H, e2, a2, b2, c2, d2, X[ 4], 7, k7); - Subround(H, d2, e2, a2, b2, c2, X[13], 5, k7); - - t = c1; c1 = c2; c2 = t; - - Subround(I, c1, d1, e1, a1, b1, X[ 1], 11, k3); - Subround(I, b1, c1, d1, e1, a1, X[ 9], 12, k3); - Subround(I, a1, b1, c1, d1, e1, X[11], 14, k3); - Subround(I, e1, a1, b1, c1, d1, X[10], 15, k3); - Subround(I, d1, e1, a1, b1, c1, X[ 0], 14, k3); - Subround(I, c1, d1, e1, a1, b1, X[ 8], 15, k3); - Subround(I, b1, c1, d1, e1, a1, X[12], 9, k3); - Subround(I, a1, b1, c1, d1, e1, X[ 4], 8, k3); - Subround(I, e1, a1, b1, c1, d1, X[13], 9, k3); - Subround(I, d1, e1, a1, b1, c1, X[ 3], 14, k3); - Subround(I, c1, d1, e1, a1, b1, X[ 7], 5, k3); - Subround(I, b1, c1, d1, e1, a1, X[15], 6, k3); - Subround(I, a1, b1, c1, d1, e1, X[14], 8, k3); - Subround(I, e1, a1, b1, c1, d1, X[ 5], 6, k3); - Subround(I, d1, e1, a1, b1, c1, X[ 6], 5, k3); - Subround(I, c1, d1, e1, a1, b1, X[ 2], 12, k3); - - Subround(G, c2, d2, e2, a2, b2, X[ 8], 15, k8); - Subround(G, b2, c2, d2, e2, a2, X[ 6], 5, k8); - Subround(G, a2, b2, c2, d2, e2, X[ 4], 8, k8); - Subround(G, e2, a2, b2, c2, d2, X[ 1], 11, k8); - Subround(G, d2, e2, a2, b2, c2, X[ 3], 14, k8); - Subround(G, c2, d2, e2, a2, b2, X[11], 14, k8); - Subround(G, b2, c2, d2, e2, a2, X[15], 6, k8); - Subround(G, a2, b2, c2, d2, e2, X[ 0], 14, k8); - Subround(G, e2, a2, b2, c2, d2, X[ 5], 6, k8); - Subround(G, d2, e2, a2, b2, c2, X[12], 9, k8); - Subround(G, c2, d2, e2, a2, b2, X[ 2], 12, k8); - Subround(G, b2, c2, d2, e2, a2, X[13], 9, k8); - Subround(G, a2, b2, c2, d2, e2, X[ 9], 12, k8); - Subround(G, e2, a2, b2, c2, d2, X[ 7], 5, k8); - Subround(G, d2, e2, a2, b2, c2, X[10], 15, k8); - Subround(G, c2, d2, e2, a2, b2, X[14], 8, k8); - - t = d1; d1 = d2; d2 = t; - - Subround(J, b1, c1, d1, e1, a1, X[ 4], 9, k4); - Subround(J, a1, b1, c1, d1, e1, X[ 0], 15, k4); - Subround(J, e1, a1, b1, c1, d1, X[ 5], 5, k4); - Subround(J, d1, e1, a1, b1, c1, X[ 9], 11, k4); - Subround(J, c1, d1, e1, a1, b1, X[ 7], 6, k4); - Subround(J, b1, c1, d1, e1, a1, X[12], 8, k4); - Subround(J, a1, b1, c1, d1, e1, X[ 2], 13, k4); - Subround(J, e1, a1, b1, c1, d1, X[10], 12, k4); - Subround(J, d1, e1, a1, b1, c1, X[14], 5, k4); - Subround(J, c1, d1, e1, a1, b1, X[ 1], 12, k4); - Subround(J, b1, c1, d1, e1, a1, X[ 3], 13, k4); - Subround(J, a1, b1, c1, d1, e1, X[ 8], 14, k4); - Subround(J, e1, a1, b1, c1, d1, X[11], 11, k4); - Subround(J, d1, e1, a1, b1, c1, X[ 6], 8, k4); - Subround(J, c1, d1, e1, a1, b1, X[15], 5, k4); - Subround(J, b1, c1, d1, e1, a1, X[13], 6, k4); - - Subround(F, b2, c2, d2, e2, a2, X[12], 8, k9); - Subround(F, a2, b2, c2, d2, e2, X[15], 5, k9); - Subround(F, e2, a2, b2, c2, d2, X[10], 12, k9); - Subround(F, d2, e2, a2, b2, c2, X[ 4], 9, k9); - Subround(F, c2, d2, e2, a2, b2, X[ 1], 12, k9); - Subround(F, b2, c2, d2, e2, a2, X[ 5], 5, k9); - Subround(F, a2, b2, c2, d2, e2, X[ 8], 14, k9); - Subround(F, e2, a2, b2, c2, d2, X[ 7], 6, k9); - Subround(F, d2, e2, a2, b2, c2, X[ 6], 8, k9); - Subround(F, c2, d2, e2, a2, b2, X[ 2], 13, k9); - Subround(F, b2, c2, d2, e2, a2, X[13], 6, k9); - Subround(F, a2, b2, c2, d2, e2, X[14], 5, k9); - Subround(F, e2, a2, b2, c2, d2, X[ 0], 15, k9); - Subround(F, d2, e2, a2, b2, c2, X[ 3], 13, k9); - Subround(F, c2, d2, e2, a2, b2, X[ 9], 11, k9); - Subround(F, b2, c2, d2, e2, a2, X[11], 11, k9); - - t = e1; e1 = e2; e2 = t; - - digest[0] += a1; - digest[1] += b1; - digest[2] += c1; - digest[3] += d1; - digest[4] += e1; - digest[5] += a2; - digest[6] += b2; - digest[7] += c2; - digest[8] += d2; - digest[9] += e2; -} - -#undef Subround - -// ************************************************************* - -// for 128 and 256 -#define Subround(f, a, b, c, d, x, s, k) \ - a += f(b, c, d) + x + k;\ - a = rotlFixed((word32)a, s); - -void RIPEMD128::InitState(HashWordType *state) -{ - state[0] = 0x67452301L; - state[1] = 0xefcdab89L; - state[2] = 0x98badcfeL; - state[3] = 0x10325476L; -} - -void RIPEMD128::Transform (word32 *digest, const word32 *X) -{ - unsigned long a1, b1, c1, d1, a2, b2, c2, d2; - a1 = a2 = digest[0]; - b1 = b2 = digest[1]; - c1 = c2 = digest[2]; - d1 = d2 = digest[3]; - - Subround(F, a1, b1, c1, d1, X[ 0], 11, k0); - Subround(F, d1, a1, b1, c1, X[ 1], 14, k0); - Subround(F, c1, d1, a1, b1, X[ 2], 15, k0); - Subround(F, b1, c1, d1, a1, X[ 3], 12, k0); - Subround(F, a1, b1, c1, d1, X[ 4], 5, k0); - Subround(F, d1, a1, b1, c1, X[ 5], 8, k0); - Subround(F, c1, d1, a1, b1, X[ 6], 7, k0); - Subround(F, b1, c1, d1, a1, X[ 7], 9, k0); - Subround(F, a1, b1, c1, d1, X[ 8], 11, k0); - Subround(F, d1, a1, b1, c1, X[ 9], 13, k0); - Subround(F, c1, d1, a1, b1, X[10], 14, k0); - Subround(F, b1, c1, d1, a1, X[11], 15, k0); - Subround(F, a1, b1, c1, d1, X[12], 6, k0); - Subround(F, d1, a1, b1, c1, X[13], 7, k0); - Subround(F, c1, d1, a1, b1, X[14], 9, k0); - Subround(F, b1, c1, d1, a1, X[15], 8, k0); - - Subround(G, a1, b1, c1, d1, X[ 7], 7, k1); - Subround(G, d1, a1, b1, c1, X[ 4], 6, k1); - Subround(G, c1, d1, a1, b1, X[13], 8, k1); - Subround(G, b1, c1, d1, a1, X[ 1], 13, k1); - Subround(G, a1, b1, c1, d1, X[10], 11, k1); - Subround(G, d1, a1, b1, c1, X[ 6], 9, k1); - Subround(G, c1, d1, a1, b1, X[15], 7, k1); - Subround(G, b1, c1, d1, a1, X[ 3], 15, k1); - Subround(G, a1, b1, c1, d1, X[12], 7, k1); - Subround(G, d1, a1, b1, c1, X[ 0], 12, k1); - Subround(G, c1, d1, a1, b1, X[ 9], 15, k1); - Subround(G, b1, c1, d1, a1, X[ 5], 9, k1); - Subround(G, a1, b1, c1, d1, X[ 2], 11, k1); - Subround(G, d1, a1, b1, c1, X[14], 7, k1); - Subround(G, c1, d1, a1, b1, X[11], 13, k1); - Subround(G, b1, c1, d1, a1, X[ 8], 12, k1); - - Subround(H, a1, b1, c1, d1, X[ 3], 11, k2); - Subround(H, d1, a1, b1, c1, X[10], 13, k2); - Subround(H, c1, d1, a1, b1, X[14], 6, k2); - Subround(H, b1, c1, d1, a1, X[ 4], 7, k2); - Subround(H, a1, b1, c1, d1, X[ 9], 14, k2); - Subround(H, d1, a1, b1, c1, X[15], 9, k2); - Subround(H, c1, d1, a1, b1, X[ 8], 13, k2); - Subround(H, b1, c1, d1, a1, X[ 1], 15, k2); - Subround(H, a1, b1, c1, d1, X[ 2], 14, k2); - Subround(H, d1, a1, b1, c1, X[ 7], 8, k2); - Subround(H, c1, d1, a1, b1, X[ 0], 13, k2); - Subround(H, b1, c1, d1, a1, X[ 6], 6, k2); - Subround(H, a1, b1, c1, d1, X[13], 5, k2); - Subround(H, d1, a1, b1, c1, X[11], 12, k2); - Subround(H, c1, d1, a1, b1, X[ 5], 7, k2); - Subround(H, b1, c1, d1, a1, X[12], 5, k2); - - Subround(I, a1, b1, c1, d1, X[ 1], 11, k3); - Subround(I, d1, a1, b1, c1, X[ 9], 12, k3); - Subround(I, c1, d1, a1, b1, X[11], 14, k3); - Subround(I, b1, c1, d1, a1, X[10], 15, k3); - Subround(I, a1, b1, c1, d1, X[ 0], 14, k3); - Subround(I, d1, a1, b1, c1, X[ 8], 15, k3); - Subround(I, c1, d1, a1, b1, X[12], 9, k3); - Subround(I, b1, c1, d1, a1, X[ 4], 8, k3); - Subround(I, a1, b1, c1, d1, X[13], 9, k3); - Subround(I, d1, a1, b1, c1, X[ 3], 14, k3); - Subround(I, c1, d1, a1, b1, X[ 7], 5, k3); - Subround(I, b1, c1, d1, a1, X[15], 6, k3); - Subround(I, a1, b1, c1, d1, X[14], 8, k3); - Subround(I, d1, a1, b1, c1, X[ 5], 6, k3); - Subround(I, c1, d1, a1, b1, X[ 6], 5, k3); - Subround(I, b1, c1, d1, a1, X[ 2], 12, k3); - - Subround(I, a2, b2, c2, d2, X[ 5], 8, k5); - Subround(I, d2, a2, b2, c2, X[14], 9, k5); - Subround(I, c2, d2, a2, b2, X[ 7], 9, k5); - Subround(I, b2, c2, d2, a2, X[ 0], 11, k5); - Subround(I, a2, b2, c2, d2, X[ 9], 13, k5); - Subround(I, d2, a2, b2, c2, X[ 2], 15, k5); - Subround(I, c2, d2, a2, b2, X[11], 15, k5); - Subround(I, b2, c2, d2, a2, X[ 4], 5, k5); - Subround(I, a2, b2, c2, d2, X[13], 7, k5); - Subround(I, d2, a2, b2, c2, X[ 6], 7, k5); - Subround(I, c2, d2, a2, b2, X[15], 8, k5); - Subround(I, b2, c2, d2, a2, X[ 8], 11, k5); - Subround(I, a2, b2, c2, d2, X[ 1], 14, k5); - Subround(I, d2, a2, b2, c2, X[10], 14, k5); - Subround(I, c2, d2, a2, b2, X[ 3], 12, k5); - Subround(I, b2, c2, d2, a2, X[12], 6, k5); - - Subround(H, a2, b2, c2, d2, X[ 6], 9, k6); - Subround(H, d2, a2, b2, c2, X[11], 13, k6); - Subround(H, c2, d2, a2, b2, X[ 3], 15, k6); - Subround(H, b2, c2, d2, a2, X[ 7], 7, k6); - Subround(H, a2, b2, c2, d2, X[ 0], 12, k6); - Subround(H, d2, a2, b2, c2, X[13], 8, k6); - Subround(H, c2, d2, a2, b2, X[ 5], 9, k6); - Subround(H, b2, c2, d2, a2, X[10], 11, k6); - Subround(H, a2, b2, c2, d2, X[14], 7, k6); - Subround(H, d2, a2, b2, c2, X[15], 7, k6); - Subround(H, c2, d2, a2, b2, X[ 8], 12, k6); - Subround(H, b2, c2, d2, a2, X[12], 7, k6); - Subround(H, a2, b2, c2, d2, X[ 4], 6, k6); - Subround(H, d2, a2, b2, c2, X[ 9], 15, k6); - Subround(H, c2, d2, a2, b2, X[ 1], 13, k6); - Subround(H, b2, c2, d2, a2, X[ 2], 11, k6); - - Subround(G, a2, b2, c2, d2, X[15], 9, k7); - Subround(G, d2, a2, b2, c2, X[ 5], 7, k7); - Subround(G, c2, d2, a2, b2, X[ 1], 15, k7); - Subround(G, b2, c2, d2, a2, X[ 3], 11, k7); - Subround(G, a2, b2, c2, d2, X[ 7], 8, k7); - Subround(G, d2, a2, b2, c2, X[14], 6, k7); - Subround(G, c2, d2, a2, b2, X[ 6], 6, k7); - Subround(G, b2, c2, d2, a2, X[ 9], 14, k7); - Subround(G, a2, b2, c2, d2, X[11], 12, k7); - Subround(G, d2, a2, b2, c2, X[ 8], 13, k7); - Subround(G, c2, d2, a2, b2, X[12], 5, k7); - Subround(G, b2, c2, d2, a2, X[ 2], 14, k7); - Subround(G, a2, b2, c2, d2, X[10], 13, k7); - Subround(G, d2, a2, b2, c2, X[ 0], 13, k7); - Subround(G, c2, d2, a2, b2, X[ 4], 7, k7); - Subround(G, b2, c2, d2, a2, X[13], 5, k7); - - Subround(F, a2, b2, c2, d2, X[ 8], 15, k9); - Subround(F, d2, a2, b2, c2, X[ 6], 5, k9); - Subround(F, c2, d2, a2, b2, X[ 4], 8, k9); - Subround(F, b2, c2, d2, a2, X[ 1], 11, k9); - Subround(F, a2, b2, c2, d2, X[ 3], 14, k9); - Subround(F, d2, a2, b2, c2, X[11], 14, k9); - Subround(F, c2, d2, a2, b2, X[15], 6, k9); - Subround(F, b2, c2, d2, a2, X[ 0], 14, k9); - Subround(F, a2, b2, c2, d2, X[ 5], 6, k9); - Subround(F, d2, a2, b2, c2, X[12], 9, k9); - Subround(F, c2, d2, a2, b2, X[ 2], 12, k9); - Subround(F, b2, c2, d2, a2, X[13], 9, k9); - Subround(F, a2, b2, c2, d2, X[ 9], 12, k9); - Subround(F, d2, a2, b2, c2, X[ 7], 5, k9); - Subround(F, c2, d2, a2, b2, X[10], 15, k9); - Subround(F, b2, c2, d2, a2, X[14], 8, k9); - - c1 = digest[1] + c1 + d2; - digest[1] = digest[2] + d1 + a2; - digest[2] = digest[3] + a1 + b2; - digest[3] = digest[0] + b1 + c2; - digest[0] = c1; -} - -// ************************************************************* - -void RIPEMD256::InitState(HashWordType *state) -{ - state[0] = 0x67452301L; - state[1] = 0xefcdab89L; - state[2] = 0x98badcfeL; - state[3] = 0x10325476L; - state[4] = 0x76543210L; - state[5] = 0xfedcba98L; - state[6] = 0x89abcdefL; - state[7] = 0x01234567L; -} - -void RIPEMD256::Transform (word32 *digest, const word32 *X) -{ - unsigned long a1, b1, c1, d1, a2, b2, c2, d2, t; - a1 = digest[0]; - b1 = digest[1]; - c1 = digest[2]; - d1 = digest[3]; - a2 = digest[4]; - b2 = digest[5]; - c2 = digest[6]; - d2 = digest[7]; - - Subround(F, a1, b1, c1, d1, X[ 0], 11, k0); - Subround(F, d1, a1, b1, c1, X[ 1], 14, k0); - Subround(F, c1, d1, a1, b1, X[ 2], 15, k0); - Subround(F, b1, c1, d1, a1, X[ 3], 12, k0); - Subround(F, a1, b1, c1, d1, X[ 4], 5, k0); - Subround(F, d1, a1, b1, c1, X[ 5], 8, k0); - Subround(F, c1, d1, a1, b1, X[ 6], 7, k0); - Subround(F, b1, c1, d1, a1, X[ 7], 9, k0); - Subround(F, a1, b1, c1, d1, X[ 8], 11, k0); - Subround(F, d1, a1, b1, c1, X[ 9], 13, k0); - Subround(F, c1, d1, a1, b1, X[10], 14, k0); - Subround(F, b1, c1, d1, a1, X[11], 15, k0); - Subround(F, a1, b1, c1, d1, X[12], 6, k0); - Subround(F, d1, a1, b1, c1, X[13], 7, k0); - Subround(F, c1, d1, a1, b1, X[14], 9, k0); - Subround(F, b1, c1, d1, a1, X[15], 8, k0); - - Subround(I, a2, b2, c2, d2, X[ 5], 8, k5); - Subround(I, d2, a2, b2, c2, X[14], 9, k5); - Subround(I, c2, d2, a2, b2, X[ 7], 9, k5); - Subround(I, b2, c2, d2, a2, X[ 0], 11, k5); - Subround(I, a2, b2, c2, d2, X[ 9], 13, k5); - Subround(I, d2, a2, b2, c2, X[ 2], 15, k5); - Subround(I, c2, d2, a2, b2, X[11], 15, k5); - Subround(I, b2, c2, d2, a2, X[ 4], 5, k5); - Subround(I, a2, b2, c2, d2, X[13], 7, k5); - Subround(I, d2, a2, b2, c2, X[ 6], 7, k5); - Subround(I, c2, d2, a2, b2, X[15], 8, k5); - Subround(I, b2, c2, d2, a2, X[ 8], 11, k5); - Subround(I, a2, b2, c2, d2, X[ 1], 14, k5); - Subround(I, d2, a2, b2, c2, X[10], 14, k5); - Subround(I, c2, d2, a2, b2, X[ 3], 12, k5); - Subround(I, b2, c2, d2, a2, X[12], 6, k5); - - t = a1; a1 = a2; a2 = t; - - Subround(G, a1, b1, c1, d1, X[ 7], 7, k1); - Subround(G, d1, a1, b1, c1, X[ 4], 6, k1); - Subround(G, c1, d1, a1, b1, X[13], 8, k1); - Subround(G, b1, c1, d1, a1, X[ 1], 13, k1); - Subround(G, a1, b1, c1, d1, X[10], 11, k1); - Subround(G, d1, a1, b1, c1, X[ 6], 9, k1); - Subround(G, c1, d1, a1, b1, X[15], 7, k1); - Subround(G, b1, c1, d1, a1, X[ 3], 15, k1); - Subround(G, a1, b1, c1, d1, X[12], 7, k1); - Subround(G, d1, a1, b1, c1, X[ 0], 12, k1); - Subround(G, c1, d1, a1, b1, X[ 9], 15, k1); - Subround(G, b1, c1, d1, a1, X[ 5], 9, k1); - Subround(G, a1, b1, c1, d1, X[ 2], 11, k1); - Subround(G, d1, a1, b1, c1, X[14], 7, k1); - Subround(G, c1, d1, a1, b1, X[11], 13, k1); - Subround(G, b1, c1, d1, a1, X[ 8], 12, k1); - - Subround(H, a2, b2, c2, d2, X[ 6], 9, k6); - Subround(H, d2, a2, b2, c2, X[11], 13, k6); - Subround(H, c2, d2, a2, b2, X[ 3], 15, k6); - Subround(H, b2, c2, d2, a2, X[ 7], 7, k6); - Subround(H, a2, b2, c2, d2, X[ 0], 12, k6); - Subround(H, d2, a2, b2, c2, X[13], 8, k6); - Subround(H, c2, d2, a2, b2, X[ 5], 9, k6); - Subround(H, b2, c2, d2, a2, X[10], 11, k6); - Subround(H, a2, b2, c2, d2, X[14], 7, k6); - Subround(H, d2, a2, b2, c2, X[15], 7, k6); - Subround(H, c2, d2, a2, b2, X[ 8], 12, k6); - Subround(H, b2, c2, d2, a2, X[12], 7, k6); - Subround(H, a2, b2, c2, d2, X[ 4], 6, k6); - Subround(H, d2, a2, b2, c2, X[ 9], 15, k6); - Subround(H, c2, d2, a2, b2, X[ 1], 13, k6); - Subround(H, b2, c2, d2, a2, X[ 2], 11, k6); - - t = b1; b1 = b2; b2 = t; - - Subround(H, a1, b1, c1, d1, X[ 3], 11, k2); - Subround(H, d1, a1, b1, c1, X[10], 13, k2); - Subround(H, c1, d1, a1, b1, X[14], 6, k2); - Subround(H, b1, c1, d1, a1, X[ 4], 7, k2); - Subround(H, a1, b1, c1, d1, X[ 9], 14, k2); - Subround(H, d1, a1, b1, c1, X[15], 9, k2); - Subround(H, c1, d1, a1, b1, X[ 8], 13, k2); - Subround(H, b1, c1, d1, a1, X[ 1], 15, k2); - Subround(H, a1, b1, c1, d1, X[ 2], 14, k2); - Subround(H, d1, a1, b1, c1, X[ 7], 8, k2); - Subround(H, c1, d1, a1, b1, X[ 0], 13, k2); - Subround(H, b1, c1, d1, a1, X[ 6], 6, k2); - Subround(H, a1, b1, c1, d1, X[13], 5, k2); - Subround(H, d1, a1, b1, c1, X[11], 12, k2); - Subround(H, c1, d1, a1, b1, X[ 5], 7, k2); - Subround(H, b1, c1, d1, a1, X[12], 5, k2); - - Subround(G, a2, b2, c2, d2, X[15], 9, k7); - Subround(G, d2, a2, b2, c2, X[ 5], 7, k7); - Subround(G, c2, d2, a2, b2, X[ 1], 15, k7); - Subround(G, b2, c2, d2, a2, X[ 3], 11, k7); - Subround(G, a2, b2, c2, d2, X[ 7], 8, k7); - Subround(G, d2, a2, b2, c2, X[14], 6, k7); - Subround(G, c2, d2, a2, b2, X[ 6], 6, k7); - Subround(G, b2, c2, d2, a2, X[ 9], 14, k7); - Subround(G, a2, b2, c2, d2, X[11], 12, k7); - Subround(G, d2, a2, b2, c2, X[ 8], 13, k7); - Subround(G, c2, d2, a2, b2, X[12], 5, k7); - Subround(G, b2, c2, d2, a2, X[ 2], 14, k7); - Subround(G, a2, b2, c2, d2, X[10], 13, k7); - Subround(G, d2, a2, b2, c2, X[ 0], 13, k7); - Subround(G, c2, d2, a2, b2, X[ 4], 7, k7); - Subround(G, b2, c2, d2, a2, X[13], 5, k7); - - t = c1; c1 = c2; c2 = t; - - Subround(I, a1, b1, c1, d1, X[ 1], 11, k3); - Subround(I, d1, a1, b1, c1, X[ 9], 12, k3); - Subround(I, c1, d1, a1, b1, X[11], 14, k3); - Subround(I, b1, c1, d1, a1, X[10], 15, k3); - Subround(I, a1, b1, c1, d1, X[ 0], 14, k3); - Subround(I, d1, a1, b1, c1, X[ 8], 15, k3); - Subround(I, c1, d1, a1, b1, X[12], 9, k3); - Subround(I, b1, c1, d1, a1, X[ 4], 8, k3); - Subround(I, a1, b1, c1, d1, X[13], 9, k3); - Subround(I, d1, a1, b1, c1, X[ 3], 14, k3); - Subround(I, c1, d1, a1, b1, X[ 7], 5, k3); - Subround(I, b1, c1, d1, a1, X[15], 6, k3); - Subround(I, a1, b1, c1, d1, X[14], 8, k3); - Subround(I, d1, a1, b1, c1, X[ 5], 6, k3); - Subround(I, c1, d1, a1, b1, X[ 6], 5, k3); - Subround(I, b1, c1, d1, a1, X[ 2], 12, k3); - - Subround(F, a2, b2, c2, d2, X[ 8], 15, k9); - Subround(F, d2, a2, b2, c2, X[ 6], 5, k9); - Subround(F, c2, d2, a2, b2, X[ 4], 8, k9); - Subround(F, b2, c2, d2, a2, X[ 1], 11, k9); - Subround(F, a2, b2, c2, d2, X[ 3], 14, k9); - Subround(F, d2, a2, b2, c2, X[11], 14, k9); - Subround(F, c2, d2, a2, b2, X[15], 6, k9); - Subround(F, b2, c2, d2, a2, X[ 0], 14, k9); - Subround(F, a2, b2, c2, d2, X[ 5], 6, k9); - Subround(F, d2, a2, b2, c2, X[12], 9, k9); - Subround(F, c2, d2, a2, b2, X[ 2], 12, k9); - Subround(F, b2, c2, d2, a2, X[13], 9, k9); - Subround(F, a2, b2, c2, d2, X[ 9], 12, k9); - Subround(F, d2, a2, b2, c2, X[ 7], 5, k9); - Subround(F, c2, d2, a2, b2, X[10], 15, k9); - Subround(F, b2, c2, d2, a2, X[14], 8, k9); - - t = d1; d1 = d2; d2 = t; - - digest[0] += a1; - digest[1] += b1; - digest[2] += c1; - digest[3] += d1; - digest[4] += a2; - digest[5] += b2; - digest[6] += c2; - digest[7] += d2; -} - -NAMESPACE_END diff --git a/CryptoPP/ripemd.h b/CryptoPP/ripemd.h deleted file mode 100644 index 56871a917..000000000 --- a/CryptoPP/ripemd.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef CRYPTOPP_RIPEMD_H -#define CRYPTOPP_RIPEMD_H - -#include "iterhash.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-160">RIPEMD-160</a> -/*! Digest Length = 160 bits */ -class RIPEMD160 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 20, RIPEMD160> -{ -public: - static void InitState(HashWordType *state); - static void Transform(word32 *digest, const word32 *data); - static const char * StaticAlgorithmName() {return "RIPEMD-160";} -}; - -/*! Digest Length = 320 bits, Security is similar to RIPEMD-160 */ -class RIPEMD320 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 40, RIPEMD320> -{ -public: - static void InitState(HashWordType *state); - static void Transform(word32 *digest, const word32 *data); - static const char * StaticAlgorithmName() {return "RIPEMD-320";} -}; - -/*! \warning RIPEMD-128 is considered insecure, and should not be used - unless you absolutely need it for compatibility. */ -class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, RIPEMD128> -{ -public: - static void InitState(HashWordType *state); - static void Transform(word32 *digest, const word32 *data); - static const char * StaticAlgorithmName() {return "RIPEMD-128";} -}; - -/*! \warning RIPEMD-256 is considered insecure, and should not be used - unless you absolutely need it for compatibility. */ -class RIPEMD256 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 32, RIPEMD256> -{ -public: - static void InitState(HashWordType *state); - static void Transform(word32 *digest, const word32 *data); - static const char * StaticAlgorithmName() {return "RIPEMD-256";} -}; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/serpent.cpp b/CryptoPP/serpent.cpp deleted file mode 100644 index 40fab23d7..000000000 --- a/CryptoPP/serpent.cpp +++ /dev/null @@ -1,123 +0,0 @@ -// serpent.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "serpent.h" -#include "misc.h" - -#include "serpentp.h" - -NAMESPACE_BEGIN(CryptoPP) - -void Serpent_KeySchedule(word32 *k, unsigned int rounds, const byte *userKey, size_t keylen) -{ - FixedSizeSecBlock<word32, 8> k0; - GetUserKey(LITTLE_ENDIAN_ORDER, k0.begin(), 8, userKey, keylen); - if (keylen < 32) - k0[keylen/4] |= word32(1) << ((keylen%4)*8); - - word32 t = k0[7]; - unsigned int i; - for (i = 0; i < 8; ++i) - k[i] = k0[i] = t = rotlFixed(k0[i] ^ k0[(i+3)%8] ^ k0[(i+5)%8] ^ t ^ 0x9e3779b9 ^ i, 11); - for (i = 8; i < 4*(rounds+1); ++i) - k[i] = t = rotlFixed(k[i-8] ^ k[i-5] ^ k[i-3] ^ t ^ 0x9e3779b9 ^ i, 11); - k -= 20; - - word32 a,b,c,d,e; - for (i=0; i<rounds/8; i++) - { - afterS2(LK); afterS2(S3); afterS3(SK); - afterS1(LK); afterS1(S2); afterS2(SK); - afterS0(LK); afterS0(S1); afterS1(SK); - beforeS0(LK); beforeS0(S0); afterS0(SK); - k += 8*4; - afterS6(LK); afterS6(S7); afterS7(SK); - afterS5(LK); afterS5(S6); afterS6(SK); - afterS4(LK); afterS4(S5); afterS5(SK); - afterS3(LK); afterS3(S4); afterS4(SK); - } - afterS2(LK); afterS2(S3); afterS3(SK); -} - -void Serpent::Base::UncheckedSetKey(const byte *userKey, unsigned int keylen, const NameValuePairs &) -{ - AssertValidKeyLength(keylen); - Serpent_KeySchedule(m_key, 32, userKey, keylen); -} - -typedef BlockGetAndPut<word32, LittleEndian> Block; - -void Serpent::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 a, b, c, d, e; - - Block::Get(inBlock)(a)(b)(c)(d); - - const word32 *k = m_key; - unsigned int i=1; - - do - { - beforeS0(KX); beforeS0(S0); afterS0(LT); - afterS0(KX); afterS0(S1); afterS1(LT); - afterS1(KX); afterS1(S2); afterS2(LT); - afterS2(KX); afterS2(S3); afterS3(LT); - afterS3(KX); afterS3(S4); afterS4(LT); - afterS4(KX); afterS4(S5); afterS5(LT); - afterS5(KX); afterS5(S6); afterS6(LT); - afterS6(KX); afterS6(S7); - - if (i == 4) - break; - - ++i; - c = b; - b = e; - e = d; - d = a; - a = e; - k += 32; - beforeS0(LT); - } - while (true); - - afterS7(KX); - - Block::Put(xorBlock, outBlock)(d)(e)(b)(a); -} - -void Serpent::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 a, b, c, d, e; - - Block::Get(inBlock)(a)(b)(c)(d); - - const word32 *k = m_key + 96; - unsigned int i=4; - - beforeI7(KX); - goto start; - - do - { - c = b; - b = d; - d = e; - k -= 32; - beforeI7(ILT); -start: - beforeI7(I7); afterI7(KX); - afterI7(ILT); afterI7(I6); afterI6(KX); - afterI6(ILT); afterI6(I5); afterI5(KX); - afterI5(ILT); afterI5(I4); afterI4(KX); - afterI4(ILT); afterI4(I3); afterI3(KX); - afterI3(ILT); afterI3(I2); afterI2(KX); - afterI2(ILT); afterI2(I1); afterI1(KX); - afterI1(ILT); afterI1(I0); afterI0(KX); - } - while (--i != 0); - - Block::Put(xorBlock, outBlock)(a)(d)(b)(e); -} - -NAMESPACE_END diff --git a/CryptoPP/serpent.h b/CryptoPP/serpent.h deleted file mode 100644 index f7ee8d611..000000000 --- a/CryptoPP/serpent.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef CRYPTOPP_SERPENT_H -#define CRYPTOPP_SERPENT_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct Serpent_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 32>, public FixedRounds<32> -{ - static const char *StaticAlgorithmName() {return "Serpent";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#Serpent">Serpent</a> -class Serpent : public Serpent_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Serpent_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - FixedSizeSecBlock<word32, 33*4> m_key; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef Serpent::Encryption SerpentEncryption; -typedef Serpent::Decryption SerpentDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/serpentp.h b/CryptoPP/serpentp.h deleted file mode 100644 index 7869a3fcf..000000000 --- a/CryptoPP/serpentp.h +++ /dev/null @@ -1,434 +0,0 @@ -// private header for Serpent and Sosemanuk - -NAMESPACE_BEGIN(CryptoPP) - -// linear transformation -#define LT(i,a,b,c,d,e) {\ - a = rotlFixed(a, 13); \ - c = rotlFixed(c, 3); \ - d = rotlFixed(d ^ c ^ (a << 3), 7); \ - b = rotlFixed(b ^ a ^ c, 1); \ - a = rotlFixed(a ^ b ^ d, 5); \ - c = rotlFixed(c ^ d ^ (b << 7), 22);} - -// inverse linear transformation -#define ILT(i,a,b,c,d,e) {\ - c = rotrFixed(c, 22); \ - a = rotrFixed(a, 5); \ - c ^= d ^ (b << 7); \ - a ^= b ^ d; \ - b = rotrFixed(b, 1); \ - d = rotrFixed(d, 7) ^ c ^ (a << 3); \ - b ^= a ^ c; \ - c = rotrFixed(c, 3); \ - a = rotrFixed(a, 13);} - -// order of output from S-box functions -#define beforeS0(f) f(0,a,b,c,d,e) -#define afterS0(f) f(1,b,e,c,a,d) -#define afterS1(f) f(2,c,b,a,e,d) -#define afterS2(f) f(3,a,e,b,d,c) -#define afterS3(f) f(4,e,b,d,c,a) -#define afterS4(f) f(5,b,a,e,c,d) -#define afterS5(f) f(6,a,c,b,e,d) -#define afterS6(f) f(7,a,c,d,b,e) -#define afterS7(f) f(8,d,e,b,a,c) - -// order of output from inverse S-box functions -#define beforeI7(f) f(8,a,b,c,d,e) -#define afterI7(f) f(7,d,a,b,e,c) -#define afterI6(f) f(6,a,b,c,e,d) -#define afterI5(f) f(5,b,d,e,c,a) -#define afterI4(f) f(4,b,c,e,a,d) -#define afterI3(f) f(3,a,b,e,c,d) -#define afterI2(f) f(2,b,d,e,c,a) -#define afterI1(f) f(1,a,b,c,e,d) -#define afterI0(f) f(0,a,d,b,e,c) - -// The instruction sequences for the S-box functions -// come from Dag Arne Osvik's paper "Speeding up Serpent". - -#define S0(i, r0, r1, r2, r3, r4) \ - { \ - r3 ^= r0; \ - r4 = r1; \ - r1 &= r3; \ - r4 ^= r2; \ - r1 ^= r0; \ - r0 |= r3; \ - r0 ^= r4; \ - r4 ^= r3; \ - r3 ^= r2; \ - r2 |= r1; \ - r2 ^= r4; \ - r4 = ~r4; \ - r4 |= r1; \ - r1 ^= r3; \ - r1 ^= r4; \ - r3 |= r0; \ - r1 ^= r3; \ - r4 ^= r3; \ - } - -#define I0(i, r0, r1, r2, r3, r4) \ - { \ - r2 = ~r2; \ - r4 = r1; \ - r1 |= r0; \ - r4 = ~r4; \ - r1 ^= r2; \ - r2 |= r4; \ - r1 ^= r3; \ - r0 ^= r4; \ - r2 ^= r0; \ - r0 &= r3; \ - r4 ^= r0; \ - r0 |= r1; \ - r0 ^= r2; \ - r3 ^= r4; \ - r2 ^= r1; \ - r3 ^= r0; \ - r3 ^= r1; \ - r2 &= r3; \ - r4 ^= r2; \ - } - -#define S1(i, r0, r1, r2, r3, r4) \ - { \ - r0 = ~r0; \ - r2 = ~r2; \ - r4 = r0; \ - r0 &= r1; \ - r2 ^= r0; \ - r0 |= r3; \ - r3 ^= r2; \ - r1 ^= r0; \ - r0 ^= r4; \ - r4 |= r1; \ - r1 ^= r3; \ - r2 |= r0; \ - r2 &= r4; \ - r0 ^= r1; \ - r1 &= r2; \ - r1 ^= r0; \ - r0 &= r2; \ - r0 ^= r4; \ - } - -#define I1(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r1; \ - r1 ^= r3; \ - r3 &= r1; \ - r4 ^= r2; \ - r3 ^= r0; \ - r0 |= r1; \ - r2 ^= r3; \ - r0 ^= r4; \ - r0 |= r2; \ - r1 ^= r3; \ - r0 ^= r1; \ - r1 |= r3; \ - r1 ^= r0; \ - r4 = ~r4; \ - r4 ^= r1; \ - r1 |= r0; \ - r1 ^= r0; \ - r1 |= r4; \ - r3 ^= r1; \ - } - -#define S2(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r0; \ - r0 &= r2; \ - r0 ^= r3; \ - r2 ^= r1; \ - r2 ^= r0; \ - r3 |= r4; \ - r3 ^= r1; \ - r4 ^= r2; \ - r1 = r3; \ - r3 |= r4; \ - r3 ^= r0; \ - r0 &= r1; \ - r4 ^= r0; \ - r1 ^= r3; \ - r1 ^= r4; \ - r4 = ~r4; \ - } - -#define I2(i, r0, r1, r2, r3, r4) \ - { \ - r2 ^= r3; \ - r3 ^= r0; \ - r4 = r3; \ - r3 &= r2; \ - r3 ^= r1; \ - r1 |= r2; \ - r1 ^= r4; \ - r4 &= r3; \ - r2 ^= r3; \ - r4 &= r0; \ - r4 ^= r2; \ - r2 &= r1; \ - r2 |= r0; \ - r3 = ~r3; \ - r2 ^= r3; \ - r0 ^= r3; \ - r0 &= r1; \ - r3 ^= r4; \ - r3 ^= r0; \ - } - -#define S3(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r0; \ - r0 |= r3; \ - r3 ^= r1; \ - r1 &= r4; \ - r4 ^= r2; \ - r2 ^= r3; \ - r3 &= r0; \ - r4 |= r1; \ - r3 ^= r4; \ - r0 ^= r1; \ - r4 &= r0; \ - r1 ^= r3; \ - r4 ^= r2; \ - r1 |= r0; \ - r1 ^= r2; \ - r0 ^= r3; \ - r2 = r1; \ - r1 |= r3; \ - r1 ^= r0; \ - } - -#define I3(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r2; \ - r2 ^= r1; \ - r1 &= r2; \ - r1 ^= r0; \ - r0 &= r4; \ - r4 ^= r3; \ - r3 |= r1; \ - r3 ^= r2; \ - r0 ^= r4; \ - r2 ^= r0; \ - r0 |= r3; \ - r0 ^= r1; \ - r4 ^= r2; \ - r2 &= r3; \ - r1 |= r3; \ - r1 ^= r2; \ - r4 ^= r0; \ - r2 ^= r4; \ - } - -#define S4(i, r0, r1, r2, r3, r4) \ - { \ - r1 ^= r3; \ - r3 = ~r3; \ - r2 ^= r3; \ - r3 ^= r0; \ - r4 = r1; \ - r1 &= r3; \ - r1 ^= r2; \ - r4 ^= r3; \ - r0 ^= r4; \ - r2 &= r4; \ - r2 ^= r0; \ - r0 &= r1; \ - r3 ^= r0; \ - r4 |= r1; \ - r4 ^= r0; \ - r0 |= r3; \ - r0 ^= r2; \ - r2 &= r3; \ - r0 = ~r0; \ - r4 ^= r2; \ - } - -#define I4(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r2; \ - r2 &= r3; \ - r2 ^= r1; \ - r1 |= r3; \ - r1 &= r0; \ - r4 ^= r2; \ - r4 ^= r1; \ - r1 &= r2; \ - r0 = ~r0; \ - r3 ^= r4; \ - r1 ^= r3; \ - r3 &= r0; \ - r3 ^= r2; \ - r0 ^= r1; \ - r2 &= r0; \ - r3 ^= r0; \ - r2 ^= r4; \ - r2 |= r3; \ - r3 ^= r0; \ - r2 ^= r1; \ - } - -#define S5(i, r0, r1, r2, r3, r4) \ - { \ - r0 ^= r1; \ - r1 ^= r3; \ - r3 = ~r3; \ - r4 = r1; \ - r1 &= r0; \ - r2 ^= r3; \ - r1 ^= r2; \ - r2 |= r4; \ - r4 ^= r3; \ - r3 &= r1; \ - r3 ^= r0; \ - r4 ^= r1; \ - r4 ^= r2; \ - r2 ^= r0; \ - r0 &= r3; \ - r2 = ~r2; \ - r0 ^= r4; \ - r4 |= r3; \ - r2 ^= r4; \ - } - -#define I5(i, r0, r1, r2, r3, r4) \ - { \ - r1 = ~r1; \ - r4 = r3; \ - r2 ^= r1; \ - r3 |= r0; \ - r3 ^= r2; \ - r2 |= r1; \ - r2 &= r0; \ - r4 ^= r3; \ - r2 ^= r4; \ - r4 |= r0; \ - r4 ^= r1; \ - r1 &= r2; \ - r1 ^= r3; \ - r4 ^= r2; \ - r3 &= r4; \ - r4 ^= r1; \ - r3 ^= r0; \ - r3 ^= r4; \ - r4 = ~r4; \ - } - -#define S6(i, r0, r1, r2, r3, r4) \ - { \ - r2 = ~r2; \ - r4 = r3; \ - r3 &= r0; \ - r0 ^= r4; \ - r3 ^= r2; \ - r2 |= r4; \ - r1 ^= r3; \ - r2 ^= r0; \ - r0 |= r1; \ - r2 ^= r1; \ - r4 ^= r0; \ - r0 |= r3; \ - r0 ^= r2; \ - r4 ^= r3; \ - r4 ^= r0; \ - r3 = ~r3; \ - r2 &= r4; \ - r2 ^= r3; \ - } - -#define I6(i, r0, r1, r2, r3, r4) \ - { \ - r0 ^= r2; \ - r4 = r2; \ - r2 &= r0; \ - r4 ^= r3; \ - r2 = ~r2; \ - r3 ^= r1; \ - r2 ^= r3; \ - r4 |= r0; \ - r0 ^= r2; \ - r3 ^= r4; \ - r4 ^= r1; \ - r1 &= r3; \ - r1 ^= r0; \ - r0 ^= r3; \ - r0 |= r2; \ - r3 ^= r1; \ - r4 ^= r0; \ - } - -#define S7(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r2; \ - r2 &= r1; \ - r2 ^= r3; \ - r3 &= r1; \ - r4 ^= r2; \ - r2 ^= r1; \ - r1 ^= r0; \ - r0 |= r4; \ - r0 ^= r2; \ - r3 ^= r1; \ - r2 ^= r3; \ - r3 &= r0; \ - r3 ^= r4; \ - r4 ^= r2; \ - r2 &= r0; \ - r4 = ~r4; \ - r2 ^= r4; \ - r4 &= r0; \ - r1 ^= r3; \ - r4 ^= r1; \ - } - -#define I7(i, r0, r1, r2, r3, r4) \ - { \ - r4 = r2; \ - r2 ^= r0; \ - r0 &= r3; \ - r2 = ~r2; \ - r4 |= r3; \ - r3 ^= r1; \ - r1 |= r0; \ - r0 ^= r2; \ - r2 &= r4; \ - r1 ^= r2; \ - r2 ^= r0; \ - r0 |= r2; \ - r3 &= r4; \ - r0 ^= r3; \ - r4 ^= r1; \ - r3 ^= r4; \ - r4 |= r0; \ - r3 ^= r2; \ - r4 ^= r2; \ - } - -// key xor -#define KX(r, a, b, c, d, e) {\ - a ^= k[4 * r + 0]; \ - b ^= k[4 * r + 1]; \ - c ^= k[4 * r + 2]; \ - d ^= k[4 * r + 3];} - -#define LK(r, a, b, c, d, e) {\ - a = k[(8-r)*4 + 0]; \ - b = k[(8-r)*4 + 1]; \ - c = k[(8-r)*4 + 2]; \ - d = k[(8-r)*4 + 3];} - -#define SK(r, a, b, c, d, e) {\ - k[(8-r)*4 + 4] = a; \ - k[(8-r)*4 + 5] = b; \ - k[(8-r)*4 + 6] = c; \ - k[(8-r)*4 + 7] = d;} - -void Serpent_KeySchedule(word32 *k, unsigned int rounds, const byte *userKey, size_t keylen); - -NAMESPACE_END diff --git a/CryptoPP/shark.cpp b/CryptoPP/shark.cpp deleted file mode 100644 index 361147e23..000000000 --- a/CryptoPP/shark.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// shark.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "shark.h" -#include "misc.h" -#include "modes.h" -#include "gf256.h" - -NAMESPACE_BEGIN(CryptoPP) - -static word64 SHARKTransform(word64 a) -{ - static const byte iG[8][8] = { - 0xe7, 0x30, 0x90, 0x85, 0xd0, 0x4b, 0x91, 0x41, - 0x53, 0x95, 0x9b, 0xa5, 0x96, 0xbc, 0xa1, 0x68, - 0x02, 0x45, 0xf7, 0x65, 0x5c, 0x1f, 0xb6, 0x52, - 0xa2, 0xca, 0x22, 0x94, 0x44, 0x63, 0x2a, 0xa2, - 0xfc, 0x67, 0x8e, 0x10, 0x29, 0x75, 0x85, 0x71, - 0x24, 0x45, 0xa2, 0xcf, 0x2f, 0x22, 0xc1, 0x0e, - 0xa1, 0xf1, 0x71, 0x40, 0x91, 0x27, 0x18, 0xa5, - 0x56, 0xf4, 0xaf, 0x32, 0xd2, 0xa4, 0xdc, 0x71, - }; - - word64 result=0; - GF256 gf256(0xf5); - for (unsigned int i=0; i<8; i++) - for(unsigned int j=0; j<8; j++) - result ^= word64(gf256.Multiply(iG[i][j], GF256::Element(a>>(56-8*j)))) << (56-8*i); - return result; -} - -void SHARK::Base::UncheckedSetKey(const byte *key, unsigned int keyLen, const NameValuePairs ¶ms) -{ - AssertValidKeyLength(keyLen); - - m_rounds = GetRoundsAndThrowIfInvalid(params, this); - m_roundKeys.New(m_rounds+1); - - // concatenate key enought times to fill a - for (unsigned int i=0; i<(m_rounds+1)*8; i++) - ((byte *)m_roundKeys.begin())[i] = key[i%keyLen]; - - SHARK::Encryption e; - e.InitForKeySetup(); - byte IV[8] = {0,0,0,0,0,0,0,0}; - CFB_Mode_ExternalCipher::Encryption cfb(e, IV); - - cfb.ProcessString((byte *)m_roundKeys.begin(), (m_rounds+1)*8); - - ConditionalByteReverse(BIG_ENDIAN_ORDER, m_roundKeys.begin(), m_roundKeys.begin(), (m_rounds+1)*8); - - m_roundKeys[m_rounds] = SHARKTransform(m_roundKeys[m_rounds]); - - if (!IsForwardTransformation()) - { - unsigned int i; - - // transform encryption round keys into decryption round keys - for (i=0; i<m_rounds/2; i++) - std::swap(m_roundKeys[i], m_roundKeys[m_rounds-i]); - - for (i=1; i<m_rounds; i++) - m_roundKeys[i] = SHARKTransform(m_roundKeys[i]); - } - -#ifdef IS_LITTLE_ENDIAN - m_roundKeys[0] = ByteReverse(m_roundKeys[0]); - m_roundKeys[m_rounds] = ByteReverse(m_roundKeys[m_rounds]); -#endif -} - -// construct an SHARK_Enc object with fixed round keys, to be used to initialize actual round keys -void SHARK::Enc::InitForKeySetup() -{ - m_rounds = DEFAULT_ROUNDS; - m_roundKeys.New(DEFAULT_ROUNDS+1); - - for (unsigned int i=0; i<DEFAULT_ROUNDS; i++) - m_roundKeys[i] = cbox[0][i]; - - m_roundKeys[DEFAULT_ROUNDS] = SHARKTransform(cbox[0][DEFAULT_ROUNDS]); - -#ifdef IS_LITTLE_ENDIAN - m_roundKeys[0] = ByteReverse(m_roundKeys[0]); - m_roundKeys[m_rounds] = ByteReverse(m_roundKeys[m_rounds]); -#endif -} - -typedef word64 ArrayOf256Word64s[256]; - -template <const byte *sbox, const ArrayOf256Word64s *cbox> -struct SharkProcessAndXorBlock{ // VC60 workaround: problem with template functions -inline SharkProcessAndXorBlock(const word64 *roundKeys, unsigned int rounds, const byte *inBlock, const byte *xorBlock, byte *outBlock) -{ - word64 tmp = *(word64 *)inBlock ^ roundKeys[0]; - - ByteOrder order = GetNativeByteOrder(); - tmp = cbox[0][GetByte(order, tmp, 0)] ^ cbox[1][GetByte(order, tmp, 1)] - ^ cbox[2][GetByte(order, tmp, 2)] ^ cbox[3][GetByte(order, tmp, 3)] - ^ cbox[4][GetByte(order, tmp, 4)] ^ cbox[5][GetByte(order, tmp, 5)] - ^ cbox[6][GetByte(order, tmp, 6)] ^ cbox[7][GetByte(order, tmp, 7)] - ^ roundKeys[1]; - - for(unsigned int i=2; i<rounds; i++) - { - tmp = cbox[0][GETBYTE(tmp, 7)] ^ cbox[1][GETBYTE(tmp, 6)] - ^ cbox[2][GETBYTE(tmp, 5)] ^ cbox[3][GETBYTE(tmp, 4)] - ^ cbox[4][GETBYTE(tmp, 3)] ^ cbox[5][GETBYTE(tmp, 2)] - ^ cbox[6][GETBYTE(tmp, 1)] ^ cbox[7][GETBYTE(tmp, 0)] - ^ roundKeys[i]; - } - - PutBlock<byte, BigEndian>(xorBlock, outBlock) - (sbox[GETBYTE(tmp, 7)]) - (sbox[GETBYTE(tmp, 6)]) - (sbox[GETBYTE(tmp, 5)]) - (sbox[GETBYTE(tmp, 4)]) - (sbox[GETBYTE(tmp, 3)]) - (sbox[GETBYTE(tmp, 2)]) - (sbox[GETBYTE(tmp, 1)]) - (sbox[GETBYTE(tmp, 0)]); - - *(word64 *)outBlock ^= roundKeys[rounds]; -}}; - -void SHARK::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - SharkProcessAndXorBlock<sbox, cbox>(m_roundKeys, m_rounds, inBlock, xorBlock, outBlock); -} - -void SHARK::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - SharkProcessAndXorBlock<sbox, cbox>(m_roundKeys, m_rounds, inBlock, xorBlock, outBlock); -} - -NAMESPACE_END diff --git a/CryptoPP/shark.h b/CryptoPP/shark.h deleted file mode 100644 index 8d5ce9ba2..000000000 --- a/CryptoPP/shark.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef CRYPTOPP_SHARK_H -#define CRYPTOPP_SHARK_H - -/** \file -*/ - -#include "config.h" -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct SHARK_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 16>, public VariableRounds<6, 2> -{ - static const char *StaticAlgorithmName() {return "SHARK-E";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#SHARK-E">SHARK-E</a> -class SHARK : public SHARK_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SHARK_Info> - { - public: - void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶m); - - protected: - unsigned int m_rounds; - SecBlock<word64> m_roundKeys; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - - // used by Base to do key setup - void InitForKeySetup(); - - private: - static const byte sbox[256]; - static const word64 cbox[8][256]; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - - private: - static const byte sbox[256]; - static const word64 cbox[8][256]; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef SHARK::Encryption SHARKEncryption; -typedef SHARK::Decryption SHARKDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/sharkbox.cpp b/CryptoPP/sharkbox.cpp deleted file mode 100644 index a0ff31f8d..000000000 --- a/CryptoPP/sharkbox.cpp +++ /dev/null @@ -1,4162 +0,0 @@ -#include "pch.h" -#include "shark.h" - -NAMESPACE_BEGIN(CryptoPP) - -const byte SHARK::Enc::sbox[256] = { -177, 206, 195, 149, 90, 173, 231, 2, 77, 68, 251, 145, 12, 135, 161, 80, -203, 103, 84, 221, 70, 143, 225, 78, 240, 253, 252, 235, 249, 196, 26, 110, - 94, 245, 204, 141, 28, 86, 67, 254, 7, 97, 248, 117, 89, 255, 3, 34, -138, 209, 19, 238, 136, 0, 14, 52, 21, 128, 148, 227, 237, 181, 83, 35, - 75, 71, 23, 167, 144, 53, 171, 216, 184, 223, 79, 87, 154, 146, 219, 27, - 60, 200, 153, 4, 142, 224, 215, 125, 133, 187, 64, 44, 58, 69, 241, 66, -101, 32, 65, 24, 114, 37, 147, 112, 54, 5, 242, 11, 163, 121, 236, 8, - 39, 49, 50, 182, 124, 176, 10, 115, 91, 123, 183, 129, 210, 13, 106, 38, -158, 88, 156, 131, 116, 179, 172, 48, 122, 105, 119, 15, 174, 33, 222, 208, - 46, 151, 16, 164, 152, 168, 212, 104, 45, 98, 41, 109, 22, 73, 118, 199, -232, 193, 150, 55, 229, 202, 244, 233, 99, 18, 194, 166, 20, 188, 211, 40, -175, 47, 230, 36, 82, 198, 160, 9, 189, 140, 207, 93, 17, 95, 1, 197, -159, 61, 162, 155, 201, 59, 190, 81, 25, 31, 63, 92, 178, 239, 74, 205, -191, 186, 111, 100, 217, 243, 62, 180, 170, 220, 213, 6, 192, 126, 246, 102, -108, 132, 113, 56, 185, 29, 127, 157, 72, 139, 42, 218, 165, 51, 130, 57, -214, 120, 134, 250, 228, 43, 169, 30, 137, 96, 107, 234, 85, 76, 247, 226, -}; - -const byte SHARK::Dec::sbox[256] = { - 53, 190, 7, 46, 83, 105, 219, 40, 111, 183, 118, 107, 12, 125, 54, 139, -146, 188, 169, 50, 172, 56, 156, 66, 99, 200, 30, 79, 36, 229, 247, 201, - 97, 141, 47, 63, 179, 101, 127, 112, 175, 154, 234, 245, 91, 152, 144, 177, -135, 113, 114, 237, 55, 69, 104, 163, 227, 239, 92, 197, 80, 193, 214, 202, - 90, 98, 95, 38, 9, 93, 20, 65, 232, 157, 206, 64, 253, 8, 23, 74, - 15, 199, 180, 62, 18, 252, 37, 75, 129, 44, 4, 120, 203, 187, 32, 189, -249, 41, 153, 168, 211, 96, 223, 17, 151, 137, 126, 250, 224, 155, 31, 210, -103, 226, 100, 119, 132, 43, 158, 138, 241, 109, 136, 121, 116, 87, 221, 230, - 57, 123, 238, 131, 225, 88, 242, 13, 52, 248, 48, 233, 185, 35, 84, 21, - 68, 11, 77, 102, 58, 3, 162, 145, 148, 82, 76, 195, 130, 231, 128, 192, -182, 14, 194, 108, 147, 236, 171, 67, 149, 246, 216, 70, 134, 5, 140, 176, -117, 0, 204, 133, 215, 61, 115, 122, 72, 228, 209, 89, 173, 184, 198, 208, -220, 161, 170, 2, 29, 191, 181, 159, 81, 196, 165, 16, 34, 207, 1, 186, -143, 49, 124, 174, 150, 218, 240, 86, 71, 212, 235, 78, 217, 19, 142, 73, - 85, 22, 255, 59, 244, 164, 178, 6, 160, 167, 251, 27, 110, 60, 51, 205, - 24, 94, 106, 213, 166, 33, 222, 254, 42, 28, 243, 10, 26, 25, 39, 45, -}; - -const word64 SHARK::Enc::cbox[8][256] = { -/* box 0 */ -W64LIT(0x060d838f16f3a365), -W64LIT(0xa68857ee5cae56f6), -W64LIT(0xebf516353c2c4d89), -W64LIT(0x652174be88e85bdc), -W64LIT(0x0d4e9a8086c17921), -W64LIT(0x27ba7d33cffa58a1), -W64LIT(0x88d9e104a237b530), -W64LIT(0x693b8755a4fbe816), -W64LIT(0xdac9591826b254a0), -W64LIT(0x45c2e369fb336af3), -W64LIT(0xa96e1fb87b3e4ef4), -W64LIT(0xb7578f1435eb7ef0), -W64LIT(0x839af80b32056f74), -W64LIT(0xae37f55cc71f277a), -W64LIT(0xa4208538fdff37d5), -W64LIT(0x35991e74ad3cdb6f), -W64LIT(0xba191594b32a07d1), -W64LIT(0x5344d1772e572b7b), -W64LIT(0xe7efe5de103ffe43), -W64LIT(0xa3796fdc41de5e5b), -W64LIT(0x2cf9643c5fc882e5), -W64LIT(0xffdbf6fd48196d22), -W64LIT(0x33949dfbbbcf780a), -W64LIT(0x7d15679dd0cec8bd), -W64LIT(0x5f5e229c024498b1), -W64LIT(0x1223634762c683ce), -W64LIT(0xdcc4da973041f7c5), -W64LIT(0x0b43190f9032da44), -W64LIT(0xc05598eddfc5a6e2), -W64LIT(0x9e5fd31a7753f4b8), -W64LIT(0x9afa8243c0f136fe), -W64LIT(0xcc4f6b06f3d61528), -W64LIT(0xdf38612a3bc25c0d), -W64LIT(0x43cf60e6edc0c996), -W64LIT(0xcfb3d0bbf855bee0), -W64LIT(0x96e071a8ece28534), -W64LIT(0x21b7febcd909fbc4), -W64LIT(0x8ed4628bb4c41655), -W64LIT(0x30682646b04cd3c2), -W64LIT(0xb5ff5dc294ba1fd3), -W64LIT(0x75aac52f4b7fb931), -W64LIT(0xe809ad8837afe641), -W64LIT(0x0eb2213d8d42d2e9), -W64LIT(0x9852509561a057dd), -W64LIT(0xaa92a40570bde53c), -W64LIT(0x7b18e412c63d6bd8), -W64LIT(0xa7dc3e85f67c9c1d), -W64LIT(0xd8618bce87e33583), -W64LIT(0xe34ab487a79d3c05), -W64LIT(0x20e397d773db312f), -W64LIT(0x05f138321d7008ad), -W64LIT(0x17d25b757fb68b63), -W64LIT(0x8a7133d20366d413), -W64LIT(0x0000000000000000), -W64LIT(0xeaa17f5e96fe8762), -W64LIT(0xc101f18675176c09), -W64LIT(0xbebc44cd0488c597), -W64LIT(0xdb9d30738c609e4b), -W64LIT(0xabc6cd6eda6f2fd7), -W64LIT(0x5aaf1aae1f34901c), -W64LIT(0xb00e65f089ca177e), -W64LIT(0xd47b7825abf08649), -W64LIT(0x924520f15b404772), -W64LIT(0x1686321ed5644188), -W64LIT(0x618425e73f4a999a), -W64LIT(0xe21eddec0d4ff6ee), -W64LIT(0xd787c398a0732d81), -W64LIT(0x1f6df9c7e407faef), -W64LIT(0x79b036c4676c0afb), -W64LIT(0x0fe6485627901802), -W64LIT(0x9cf701ccd602959b), -W64LIT(0xbfe82da6ae5a0f7c), -W64LIT(0x990639fecb729d36), -W64LIT(0xca42e889e525b64d), -W64LIT(0xb3f2de4d8249bcb6), -W64LIT(0x4033db5be643625e), -W64LIT(0x4167b2304c91a8b5), -W64LIT(0x108bb191c397e2ed), -W64LIT(0x1834132358269361), -W64LIT(0x541d3b93927642f5), -W64LIT(0x90edf227fa112651), -W64LIT(0x1dc52b1145569bcc), -W64LIT(0xe6bb8cb5baed34a8), -W64LIT(0xd276fbaabd03252c), -W64LIT(0x313c4f2d1a9e1929), -W64LIT(0xfd73242be9480c01), -W64LIT(0x9baeeb286a23fc15), -W64LIT(0xc9be5334eea61d85), -W64LIT(0xc70c720963e4cf6c), -W64LIT(0x3eda077b3d0e012b), -W64LIT(0x97b418c346304fdf), -W64LIT(0x32c0f490111db2e1), -W64LIT(0x2ba08ed8e3e9eb6b), -W64LIT(0x8b255ab9a9b41ef8), -W64LIT(0x91b99b4c50c3ecba), -W64LIT(0xfe8f9f96e2cba7c9), -W64LIT(0x3a7f56228aacc36d), -W64LIT(0xb15a0c9b2318dd95), -W64LIT(0x5953a11314b73bd4), -W64LIT(0xf3c10516640adee8), -W64LIT(0xedf895ba2adfeeec), -W64LIT(0xadcb4ee1cc9c8cb2), -W64LIT(0xde6c0841911096e6), -W64LIT(0x84c312ef8e2406fa), -W64LIT(0xa83a76d3d1ec841f), -W64LIT(0x1c91427aef845127), -W64LIT(0x3665a5c9a6bf70a7), -W64LIT(0xf6303d24797ad645), -W64LIT(0xcd1b026d5904dfc3), -W64LIT(0x1bc8a89e53a538a9), -W64LIT(0x7ee9dc20db4d6375), -W64LIT(0x51ec03a18f064a58), -W64LIT(0xc4f0c9b4686764a4), -W64LIT(0xdd90b3fc9a933d2e), -W64LIT(0x7a4c8d796cefa133), -W64LIT(0x73a746a05d8c1a54), -W64LIT(0x0759eae4bc21698e), -W64LIT(0xc8ea3a5f4474d76e), -W64LIT(0x38d784f42bfda24e), -W64LIT(0x231f2c6a78589ae7), -W64LIT(0xc3a92350d4460d2a), -W64LIT(0x72f32fcbf75ed0bf), -W64LIT(0xbd40ff700f0b6e5f), -W64LIT(0x157a89a3dee7ea40), -W64LIT(0x873fa95285a7ad32), -W64LIT(0x4d7d41db60821b7f), -W64LIT(0x1e3990ac4ed53004), -W64LIT(0x0a1770643ae010af), -W64LIT(0x9311499af1928d99), -W64LIT(0x64751dd5223a9137), -W64LIT(0xfa2acecf5569658f), -W64LIT(0x7c410ef67a1c0256), -W64LIT(0x56b5e945332723d6), -W64LIT(0x6f3604dab2084b73), -W64LIT(0xe95dc4e39d7d2caa), -W64LIT(0x13770a2cc8144925), -W64LIT(0xbc14961ba5d9a4b4), -W64LIT(0xb9e5ae29b8a9ac19), -W64LIT(0xf169d7c0c55bbfcb), -W64LIT(0x2446c68ec479f369), -W64LIT(0x806643b63986c4bc), -W64LIT(0x7fbdb54b719fa99e), -W64LIT(0x04a55159b7a2c246), -W64LIT(0xee042e07215c4524), -W64LIT(0x5bfb73c5b5e65af7), -W64LIT(0x0c1af3eb2c13b3ca), -W64LIT(0xa22d06b7eb0c94b0), -W64LIT(0xb8b1c742127b66f2), -W64LIT(0x285c3565e86a40a3), -W64LIT(0x3b2b3f49207e0986), -W64LIT(0x3c72d5ad9c5f6008), -W64LIT(0x770217f9ea2ed812), -W64LIT(0xfc274d40439ac6ea), -W64LIT(0x4fd5930dc1d37a5c), -W64LIT(0x2e51b6eafe99e3c6), -W64LIT(0x6b93558305aa8935), -W64LIT(0x19607a48f2f4598a), -W64LIT(0x08bfa2b29bb1718c), -W64LIT(0x3f8e6e1097dccbc0), -W64LIT(0x3983ed9f812f68a5), -W64LIT(0xac9f278a664e4659), -W64LIT(0x82ce916098d7a59f), -W64LIT(0xc2fd4a3b7e94c7c1), -W64LIT(0x66ddcf03836bf014), -W64LIT(0xe1e2665106cc5d26), -W64LIT(0x74feac44e1ad73da), -W64LIT(0x8d28d936bf47bd9d), -W64LIT(0x62789e5a34c93252), -W64LIT(0x81322add93540e57), -W64LIT(0xcb1681e24ff77ca6), -W64LIT(0x2512afe56eab3982), -W64LIT(0xd18a4017b6808ee4), -W64LIT(0x705bfd1d560fb19c), -W64LIT(0x4b70c2547671b81a), -W64LIT(0x49d81082d720d939), -W64LIT(0xe0b60f3aac1e97cd), -W64LIT(0x4e81fa666b01b0b7), -W64LIT(0x951cca15e7612efc), -W64LIT(0x463e58d4f0b0c13b), -W64LIT(0x632cf7319e1bf8b9), -W64LIT(0x5ca2992109c73379), -W64LIT(0xf764544fd3a81cae), -W64LIT(0x6ac73ce8af7843de), -W64LIT(0x9f0bba71dd813e53), -W64LIT(0x85977b8424f6cc11), -W64LIT(0x5807c878be65f13f), -W64LIT(0x686fee3e0e2922fd), -W64LIT(0x78e45fafcdbec010), -W64LIT(0x6ccabf67b98be0bb), -W64LIT(0x11dfd8fa69452806), -W64LIT(0xcee7b9d05287740b), -W64LIT(0x50b86aca25d480b3), -W64LIT(0x5df6f04aa315f992), -W64LIT(0x5e0a4bf7a896525a), -W64LIT(0x03fcbbbd0b83abc8), -W64LIT(0x8f800be01e16dcbe), -W64LIT(0xd32292c117d1efc7), -W64LIT(0xe5473708b16e9f60), -W64LIT(0x224b4501d28a500c), -W64LIT(0xfb7ea7a4ffbbaf64), -W64LIT(0x3d26bcc6368daae3), -W64LIT(0x866bc0392f7567d9), -W64LIT(0x3731cca20c6dba4c), -W64LIT(0xb603e67f9f39b41b), -W64LIT(0xa1d1bd0ae08f3f78), -W64LIT(0xd935e2a52d31ff68), -W64LIT(0xaf639c376dcded91), -W64LIT(0x0154696baad2caeb), -W64LIT(0xecacfcd1800d2407), -W64LIT(0xf03dbeab6f897520), -W64LIT(0x02a8d2d6a1516123), -W64LIT(0xf498eff2d82bb766), -W64LIT(0x710f9476fcdd7b77), -W64LIT(0xf8821c19f43804ac), -W64LIT(0xf9d675725eeace47), -W64LIT(0x1a9cc1f5f977f242), -W64LIT(0x5210b81c8485e190), -W64LIT(0x6d9ed60c13592a50), -W64LIT(0xf2956c7dced81403), -W64LIT(0xbb4d7cff19f8cd3a), -W64LIT(0x4c2928b0ca50d194), -W64LIT(0x6e626db118da8198), -W64LIT(0xe4135e631bbc558b), -W64LIT(0x9da368a77cd05f70), -W64LIT(0xa574ec53572dfd3e), -W64LIT(0x09ebcbd93163bb67), -W64LIT(0x4a24ab3fdca372f1), -W64LIT(0x429b098d4712037d), -W64LIT(0x57e1802e99f5e93d), -W64LIT(0xef50476c8b8e8fcf), -W64LIT(0xa085d4614a5df593), -W64LIT(0x34cd771f07ee1184), -W64LIT(0xc6581b62c9360587), -W64LIT(0x2dad0d57f51a480e), -W64LIT(0x898d886f08e57fdb), -W64LIT(0xd6d3aaf30aa1e76a), -W64LIT(0x76567e9240fc12f9), -W64LIT(0xb4ab34a93e68d538), -W64LIT(0xb2a6b726289b765d), -W64LIT(0x8c7cb05d15957776), -W64LIT(0x554952f838a4881e), -W64LIT(0xd52f114e01224ca2), -W64LIT(0x60d04c8c95985371), -W64LIT(0x6789a66829b93aff), -W64LIT(0x2f05df81544b292d), -W64LIT(0x476a31bf5a620bd0), -W64LIT(0xf5cc869972f97d8d), -W64LIT(0x488c79e97df213d2), -W64LIT(0x44968a0251e1a018), -W64LIT(0x26ee14586528924a), -W64LIT(0xd0de297c1c52440f), -W64LIT(0xc5a4a0dfc2b5ae4f), -W64LIT(0x29085c0e42b88a48), -W64LIT(0x142ee0c8743520ab), -W64LIT(0x2af4e7b3493b2180), -W64LIT(0x9448a37e4db3e417), -/* box 1 */ -W64LIT(0xe2795ba105ba30ce), -W64LIT(0x65b5d634f5e0fbdd), -W64LIT(0x2d7d7f1464dd8c55), -W64LIT(0xeefbf778add1c20b), -W64LIT(0x1eb0fbd1f11968e7), -W64LIT(0xe6073f45ce30cd8d), -W64LIT(0x21ffd3cdccb67e90), -W64LIT(0xdf0941cfa750a262), -W64LIT(0xc61df5b1b75ef18a), -W64LIT(0xc5c7defa9dc337c6), -W64LIT(0x2581b729073c83d3), -W64LIT(0xa5e97513167173cf), -W64LIT(0xdd3673bd381526b9), -W64LIT(0xe8baa1eef91ebb93), -W64LIT(0x3b314cf8f625eb34), -W64LIT(0x579d4bc8d5fc5df8), -W64LIT(0xbb598ec2e7681b28), -W64LIT(0xc8a06b1a80708794), -W64LIT(0x1c8fc9a36e5cec3c), -W64LIT(0xf60a5a3f0807d374), -W64LIT(0x1ace9f353a9395a4), -W64LIT(0x7e9e50387aab2cee), -W64LIT(0xb5e41069d0466d36), -W64LIT(0x8cea6ee3b92602d9), -W64LIT(0xf952ddad8af1e7fd), -W64LIT(0xb19a748d1bcc9075), -W64LIT(0x2464ae10b2e4c144), -W64LIT(0xfcc9a070f4a35829), -W64LIT(0xfa88f6e6a06c21b1), -W64LIT(0x2c98662dd105cec2), -W64LIT(0x9065a740d77aeee5), -W64LIT(0xcb7a4051aaed41d8), -W64LIT(0x55a279ba4ab9d923), -W64LIT(0x27be855b98790708), -W64LIT(0xbabc97fb52b059bf), -W64LIT(0xa19711f7ddfb8e8c), -W64LIT(0x047e64e4cb8afd43), -W64LIT(0xc386886cc90c4e5e), -W64LIT(0xc422c7c3281b7551), -W64LIT(0xfb6defdf15b46326), -W64LIT(0x01e51939b5d84297), -W64LIT(0x5cbba8be9c809432), -W64LIT(0x6f762c7b09447080), -W64LIT(0xcee13d8cd4bffe0c), -W64LIT(0x54476083ff619bb4), -W64LIT(0x6e933542bc9c3217), -W64LIT(0x4af79b520e78f353), -W64LIT(0x98996f7db49be163), -W64LIT(0xa07208ce6823cc1b), -W64LIT(0x2b3c29823012f5cd), -W64LIT(0x93bf8c0bfde728a9), -W64LIT(0x2225f886e62bb8dc), -W64LIT(0x7f7b4901cf736e79), -W64LIT(0x0000000000000000), -W64LIT(0x023f32729f4584db), -W64LIT(0xd5cabb805bf4293f), -W64LIT(0x07a44fafe1173b0f), -W64LIT(0xe95fb8d74cc6f904), -W64LIT(0x7b052de504f9933a), -W64LIT(0x6aed51a67716cf54), -W64LIT(0x68d263d4e8534b8f), -W64LIT(0xa96bd9cabe1a810a), -W64LIT(0x1d6ad09adb84aeab), -W64LIT(0x0d67b5e01db3b052), -W64LIT(0x52063615abaee22c), -W64LIT(0x8f3045a893bbc495), -W64LIT(0xd8ad0e604647996d), -W64LIT(0xaf2a8f5cead5f892), -W64LIT(0x3017af8ebf5922fe), -W64LIT(0x4034611df2dc780e), -W64LIT(0x721cfce1d2c0de2b), -W64LIT(0x28e602c91a8f3381), -W64LIT(0xe1a370ea2f27f682), -W64LIT(0x29031bf0af577116), -W64LIT(0x1914b47e100e53e8), -W64LIT(0x567852f160241f6f), -W64LIT(0x793a1f979bbc17e1), -W64LIT(0xef1eee411809809c), -W64LIT(0x6211999b14f7c0d2), -W64LIT(0x059b7ddd7e52bfd4), -W64LIT(0x43ee4a56d841be42), -W64LIT(0xf1ae1590e910e87b), -W64LIT(0x33cd84c595c4e4b2), -W64LIT(0x4b12826bbba0b1c4), -W64LIT(0xeb608aa5d3837ddf), -W64LIT(0x201acaf4796e3c07), -W64LIT(0xbf27ea262ce2e66b), -W64LIT(0x58c5cc5a570a6971), -W64LIT(0x37b3e0215e4e19f1), -W64LIT(0xab54ebb8215f05d1), -W64LIT(0x8ed55c9126638602), -W64LIT(0x9aa65d0f2bde65b8), -W64LIT(0xd7f589f2c4b1ade4), -W64LIT(0x5039046734eb66f7), -W64LIT(0x6cac073023d9b6cc), -W64LIT(0x51dc1d5e81332460), -W64LIT(0x17a92ad5272025f6), -W64LIT(0x47902eb213cb4301), -W64LIT(0x1b2b860c8f4bd733), -W64LIT(0x4f6ce68f702a4c87), -W64LIT(0xcf0424b56167bc9b), -W64LIT(0x997c76440143a3f4), -W64LIT(0x7ae034dcb121d1ad), -W64LIT(0x100d657ac6371ef9), -W64LIT(0x0ac3fa4ffca48b5d), -W64LIT(0xdeec58f61288e0f5), -W64LIT(0x265b9c622da1459f), -W64LIT(0xdcd36a848dcd642e), -W64LIT(0xe4380d3751754956), -W64LIT(0x13d74e31ecaad8b5), -W64LIT(0xfd2cb949417b1abe), -W64LIT(0x9624f1d683b5977d), -W64LIT(0x4675378ba6130196), -W64LIT(0x0b26e376497cc9ca), -W64LIT(0x41d1782447043a99), -W64LIT(0xe39c4298b0627259), -W64LIT(0xcd3b16c7fe223840), -W64LIT(0x7787813cac9261ff), -W64LIT(0x492db01924e5351f), -W64LIT(0x5afafe28c84fedaa), -W64LIT(0x8b4e214c583139d6), -W64LIT(0xccde0ffe4bfa7ad7), -W64LIT(0x76629805194a2368), -W64LIT(0x7ca1624ae5eea835), -W64LIT(0x61cbb2d03e6a069e), -W64LIT(0x48c8a920913d7788), -W64LIT(0x8068c23a114df01c), -W64LIT(0xd38bed160f3b50a7), -W64LIT(0x32289dfc201ca625), -W64LIT(0xc1b9ba1e5649ca85), -W64LIT(0xed21dc33874c0447), -W64LIT(0xa3a8238542be0a57), -W64LIT(0x5b1fe7117d97af3d), -W64LIT(0x3d701a6ea2ea92ac), -W64LIT(0x73f9e5d867189cbc), -W64LIT(0x9ed839ebe05498fb), -W64LIT(0x5920d563e2d22be6), -W64LIT(0xca9f59681f35034f), -W64LIT(0x11e87c4373ef5c6e), -W64LIT(0x97c1e8ef366dd5ea), -W64LIT(0xacf0a417c0483ede), -W64LIT(0xd26ef42fbae31230), -W64LIT(0xbcfdc16d067f2027), -W64LIT(0xbec2f31f993aa4fc), -W64LIT(0x45af1cc08c8ec7da), -W64LIT(0x31f2b6b70a816069), -W64LIT(0xd9481759f39fdbfa), -W64LIT(0xe5dd140ee4ad0bc1), -W64LIT(0xa6335e583cecb583), -W64LIT(0x38eb67b3dcb82d78), -W64LIT(0xf5d07174229a1538), -W64LIT(0x5f6183f5b61d527e), -W64LIT(0x0f58879282f63489), -W64LIT(0x164c33ec92f86761), -W64LIT(0x444a05f93956854d), -W64LIT(0x818ddb03a495b28b), -W64LIT(0x4d53d4fdef6fc85c), -W64LIT(0x8d0f77da0cfe404e), -W64LIT(0x8416a6dedac70d5f), -W64LIT(0x666ffd7fdf7d3d91), -W64LIT(0xb63e3b22fadbab7a), -W64LIT(0xf2743edbc38d2e37), -W64LIT(0xa40c6c2aa3a93158), -W64LIT(0x9f3d20d2558cda6c), -W64LIT(0xfef692026be6dcf2), -W64LIT(0x2ea7545f4e404a19), -W64LIT(0xb2405fc631515639), -W64LIT(0x23c0e1bf53f3fa4b), -W64LIT(0x83b2e9713bd03650), -W64LIT(0x0641569654cf7998), -W64LIT(0xb883a589cdf5dd64), -W64LIT(0x3ad455c143fda9a3), -W64LIT(0x925a9532483f6a3e), -W64LIT(0xaab1f28194874746), -W64LIT(0xf435684d974257af), -W64LIT(0xd1b4df64907ed47c), -W64LIT(0x390e7e8a69606fef), -W64LIT(0xd051c65d25a696eb), -W64LIT(0xb4010950659e2fa1), -W64LIT(0x0c82acd9a86bf2c5), -W64LIT(0x88940a0772acff9a), -W64LIT(0xf39127e276556ca0), -W64LIT(0xaecf96655f0dba05), -W64LIT(0x03da2b4b2a9dc64c), -W64LIT(0x3f4f281c3daf1677), -W64LIT(0x3469cb6a74d3dfbd), -W64LIT(0xf04b0ca95cc8aaec), -W64LIT(0x1f55e2e844c12a70), -W64LIT(0x4cb6cdc45ab78acb), -W64LIT(0xc05ca327e3918812), -W64LIT(0x95feda9da9285131), -W64LIT(0xb966bcb0782d9ff3), -W64LIT(0xa7d647618934f714), -W64LIT(0xd61090cb7169ef73), -W64LIT(0x71c6d7aaf85d1867), -W64LIT(0xecc4c50a329446d0), -W64LIT(0x6450cf0d4038b94a), -W64LIT(0x420b536f6d99fcd5), -W64LIT(0x75b8b34e33d7e524), -W64LIT(0xc26391557cd40cc9), -W64LIT(0xda923c12d9021db6), -W64LIT(0x4e89ffb6c5f20e10), -W64LIT(0x0919d104d6394d11), -W64LIT(0x8aab3875ede97b41), -W64LIT(0xa88ec0f30bc2c39d), -W64LIT(0xb7db221b4f03e9ed), -W64LIT(0xc7f8ec880286b31d), -W64LIT(0x2f424d66fb98088e), -W64LIT(0xe04669d39affb415), -W64LIT(0x3eaa3125887754e0), -W64LIT(0x5e849acc03c510e9), -W64LIT(0x8257f0488e0874c7), -W64LIT(0xbd18d854b3a762b0), -W64LIT(0xb3a546ff848914ae), -W64LIT(0x9ce70b997f111c20), -W64LIT(0x3c9503571732d03b), -W64LIT(0xe7e2267c7be88f1a), -W64LIT(0x63f480a2a12f8245), -W64LIT(0x602eabe98bb24409), -W64LIT(0x941bc3a41cf013a6), -W64LIT(0x678ae4466aa57f06), -W64LIT(0x1232570859729a22), -W64LIT(0x6d491e099601f45b), -W64LIT(0x5d5eb1872958d6a5), -W64LIT(0x1473019e0dbde3ba), -W64LIT(0xa24d3abcf76648c0), -W64LIT(0x85f3bfe76f1f4fc8), -W64LIT(0x08fcc83d63e10f86), -W64LIT(0x745daa77860fa7b3), -W64LIT(0x9180be7962a2ac72), -W64LIT(0x87cc8d95f05acb13), -W64LIT(0x78df06ae2e645576), -W64LIT(0x18f1ad47a5d6117f), -W64LIT(0x358cd253c10b9d2a), -W64LIT(0x0ebd9eab372e761e), -W64LIT(0xf7ef4306bddf91e3), -W64LIT(0x7023ce934d855af0), -W64LIT(0xd42fa2b9ee2c6ba8), -W64LIT(0x3656f918eb965b66), -W64LIT(0x9d0212a0cac95eb7), -W64LIT(0x2ad930bb85cab75a), -W64LIT(0x862994ac45828984), -W64LIT(0x7d447b735036eaa2), -W64LIT(0xb07f6db4ae14d2e2), -W64LIT(0x6b08489fc2ce8dc3), -W64LIT(0x9b4344369e06272f), -W64LIT(0xad15bd2e75907c49), -W64LIT(0xdb77252b6cda5f21), -W64LIT(0xea85939c665b3f48), -W64LIT(0xc945722335a8c503), -W64LIT(0x159618a7b865a12d), -W64LIT(0x69377aed5d8b0918), -W64LIT(0x8971133ec774bd0d), -W64LIT(0x53e32f2c1e76a0bb), -W64LIT(0xf8b7c4943f29a56a), -W64LIT(0xff138b3bde3e9e65), -/* box 2 */ -W64LIT(0x7c6a2eb5fdabecc6), -W64LIT(0x401cda0a752bbea0), -W64LIT(0x1925217156dc57c4), -W64LIT(0x56dec6d301d70787), -W64LIT(0x41c751ff73c6ac58), -W64LIT(0xc9067697a92cb5f9), -W64LIT(0x3391c917aaa0bc85), -W64LIT(0xae0a9a4c0e742afe), -W64LIT(0xaa8ca972162a62f4), -W64LIT(0x5aa193912935df99), -W64LIT(0x86fd9135fe27e5ba), -W64LIT(0xffca074b1d3f538e), -W64LIT(0x0e3cb65d24cdfc1b), -W64LIT(0x4384b2e07fe9885d), -W64LIT(0xc73ac0ca8de149e2), -W64LIT(0x48e5bc7645972eb4), -W64LIT(0xbe0d56b46ef9ffd6), -W64LIT(0x200e6d05c0ef5f50), -W64LIT(0xe1f17dee597f7abd), -W64LIT(0x0243e31f0c2f2405), -W64LIT(0xf4ab09dd2741f567), -W64LIT(0xe4acc52547cc204f), -W64LIT(0x348f92c3b83cc272), -W64LIT(0x53837e181f645d75), -W64LIT(0xd8da319acf4c7229), -W64LIT(0x81e3cae1ecbb9b4d), -W64LIT(0xd6e687c7eb818e32), -W64LIT(0x3dad7f4a8e6d409e), -W64LIT(0x28f70b79f053cf44), -W64LIT(0x493e3783437a3c4c), -W64LIT(0xb27203f6461b27c8), -W64LIT(0xd02357e6fff0e23d), -W64LIT(0xe8d390676f2ef851), -W64LIT(0x26cbbd24d49e335f), -W64LIT(0xee1640467b5f945e), -W64LIT(0x4aa65f6949b80ab1), -W64LIT(0xb56c58225487593f), -W64LIT(0x4ffbe7a2570b5043), -W64LIT(0x0aba85633c93b411), -W64LIT(0x78ec1d8be5f5a4cc), -W64LIT(0x501b16f215a66b88), -W64LIT(0x271036d1d27321a7), -W64LIT(0x7ff2465ff769da3b), -W64LIT(0x35541936bed1d08a), -W64LIT(0xb8c886957a8893d9), -W64LIT(0x2fe950ade2cfb1b3), -W64LIT(0xf90fd76a094e3f81), -W64LIT(0x2daab3b2eee095b6), -W64LIT(0x1abd499b5c1e6139), -W64LIT(0x0c7f554228e2d81e), -W64LIT(0x425f391579049aa5), -W64LIT(0xc3bcf3f495bf01e8), -W64LIT(0xb4b7d3d7526a4bc7), -W64LIT(0x0000000000000000), -W64LIT(0xa0362c112ab9d6e5), -W64LIT(0x91e406198c364e65), -W64LIT(0x454162c16b98e452), -W64LIT(0x139fa4126a4fe3d5), -W64LIT(0x01db8bf506ed12f8), -W64LIT(0x9a85088fb648e88c), -W64LIT(0x3ab3249e9cf13e69), -W64LIT(0xd57eef2de143b8cf), -W64LIT(0xb1ea6b1c4cd91135), -W64LIT(0x7aaffe94e9da80c9), -W64LIT(0xad92f2a604b61c03), -W64LIT(0xa3ae44fb207be018), -W64LIT(0xeb4bf88d65ecceac), -W64LIT(0xc0249b1e9f7d3715), -W64LIT(0xa8cf4a6d1a0546f1), -W64LIT(0xc6e14b3f8b0c5b1a), -W64LIT(0xce182d43bbb0cb0e), -W64LIT(0xfc526fa117fd6573), -W64LIT(0x8c471456c2b451ab), -W64LIT(0xac497953025b0efb), -W64LIT(0x0486333e185e480a), -W64LIT(0x18feaa845031453c), -W64LIT(0xa1eda7e42c54c41d), -W64LIT(0x06c5d02114716c0f), -W64LIT(0x055db8cb1eb35af2), -W64LIT(0xe5774ed0412132b7), -W64LIT(0x36cc71dcb413e677), -W64LIT(0x470281de67b7c057), -W64LIT(0x58e2708e251afb9c), -W64LIT(0xa914c1981ce85409), -W64LIT(0xb3a9880340f63530), -W64LIT(0x638adfe5bf06d70d), -W64LIT(0x0b610e963a7ea6e9), -W64LIT(0x927c6ef386f47898), -W64LIT(0xed8e28ac719da2a3), -W64LIT(0x7548c33ccbfa6e2a), -W64LIT(0xf3b5520935dd8b90), -W64LIT(0x8d9c9fa3c4594353), -W64LIT(0x31d22a08a68f9880), -W64LIT(0x0da4deb72e0fcae6), -W64LIT(0x8fdf7cbcc8766756), -W64LIT(0x5dbfc8453ba9a16e), -W64LIT(0x8e04f749ce9b75ae), -W64LIT(0x83a029fee094bf48), -W64LIT(0xa4b01f2f32e79eef), -W64LIT(0x1c7899ba486f0d36), -W64LIT(0x654f0fc4ab77bb02), -W64LIT(0x7db1a540fb46fe3e), -W64LIT(0x51c09d07134b7970), -W64LIT(0xcb459588a50391fc), -W64LIT(0x3fee9c558242649b), -W64LIT(0xfe118cbe1bd24176), -W64LIT(0x76d0abd6c13858d7), -W64LIT(0x5e27a0af316b9793), -W64LIT(0x69305a868395631c), -W64LIT(0x3b68af6b9a1c2c91), -W64LIT(0x6db669b89bcb2b16), -W64LIT(0xa72877c53825a812), -W64LIT(0xd3bb3f0cf532d4c0), -W64LIT(0x6ff58aa797e40f13), -W64LIT(0x96fa5dcd9eaa3092), -W64LIT(0x2c713847e80d874e), -W64LIT(0xc57923d581ce6de7), -W64LIT(0x2b6f6393fa91f9b9), -W64LIT(0x0922ed89365182ec), -W64LIT(0x324a42e2ac4dae7d), -W64LIT(0x16c21cd974fcb927), -W64LIT(0x956235279468066f), -W64LIT(0x7b747561ef379231), -W64LIT(0x449ae9346d75f6aa), -W64LIT(0xf570822821ace79f), -W64LIT(0x5939fb7b23f7e964), -W64LIT(0x7937967ee318b634), -W64LIT(0x84be722af208c1bf), -W64LIT(0x08f9667c30bc9014), -W64LIT(0xefcdcbb37db286a6), -W64LIT(0xa6f3fc303ec8baea), -W64LIT(0xea9073786301dc54), -W64LIT(0x62515410b9ebc5f5), -W64LIT(0xd260b4f9f3dfc638), -W64LIT(0x9e033bb1ae16a086), -W64LIT(0x38f0c78190de1a6c), -W64LIT(0xc267780193521310), -W64LIT(0x80384114ea5689b5), -W64LIT(0x9b5e837ab0a5fa74), -W64LIT(0xf73361372d83c39a), -W64LIT(0x3009a1fda0628a78), -W64LIT(0xd4a564d8e7aeaa37), -W64LIT(0xfb4c347505611b84), -W64LIT(0x5b7a18642fd8cd61), -W64LIT(0x239605efca2d69ad), -W64LIT(0xf8d45c9f0fa32d79), -W64LIT(0xbb50ee7f704aa524), -W64LIT(0x392b4c7496330894), -W64LIT(0x0fe73da82220eee3), -W64LIT(0x3717fa29b2fef48f), -W64LIT(0xf26ed9fc33309968), -W64LIT(0xd73d0c32ed6c9cca), -W64LIT(0xda99d285c363562c), -W64LIT(0xde1fe1bbdb3d1e26), -W64LIT(0x738d131ddf8b0225), -W64LIT(0x292c808cf6beddbc), -W64LIT(0xbc4eb5ab62d6dbd3), -W64LIT(0x039868ea0ac236fd), -W64LIT(0xcc5bce5cb79fef0b), -W64LIT(0xb031e0e94a3403cd), -W64LIT(0xc4a2a82087237f1f), -W64LIT(0xb72fbb3d58a87d3a), -W64LIT(0xafd111b908993806), -W64LIT(0x68ebd173857871e4), -W64LIT(0x9d9b535ba4d4967b), -W64LIT(0xe9081b9269c3eaa9), -W64LIT(0x71cef002d3a42620), -W64LIT(0x93a7e50680196a60), -W64LIT(0x891aac9ddc070b59), -W64LIT(0x155a74337e3e8fda), -W64LIT(0x4e206c5751e642bb), -W64LIT(0x9721d6389847226a), -W64LIT(0x12442fe76ca2f12d), -W64LIT(0x2553d5cede5c05a2), -W64LIT(0xa275cf0e2696f2e0), -W64LIT(0x24885e3bd8b1175a), -W64LIT(0x670cecdba7589f07), -W64LIT(0x749348c9cd177cd2), -W64LIT(0x64948431ad9aa9fa), -W64LIT(0x2ab4e866fc7ceb41), -W64LIT(0xe6ef263a4be3044a), -W64LIT(0xe734adcf4d0e16b2), -W64LIT(0x903f8dec8adb5c9d), -W64LIT(0xf02d3ae33f1fbd6d), -W64LIT(0x725698e8d96610dd), -W64LIT(0x1da3124f4e821fce), -W64LIT(0x1719972c7211abdf), -W64LIT(0x11dc470d6660c7d0), -W64LIT(0xec55a3597770b05b), -W64LIT(0xbfd6dd416814ed2e), -W64LIT(0x57054d26073a157f), -W64LIT(0x1e3b7aa544402933), -W64LIT(0x5ffc2b5a3786856b), -W64LIT(0x61c93cfab329f308), -W64LIT(0x3e3517a084af7663), -W64LIT(0xf6e8eac22b6ed162), -W64LIT(0x1007ccf8608dd528), -W64LIT(0x66d7672ea1b58dff), -W64LIT(0x8b594f82d0282f5c), -W64LIT(0x1fe0f15042ad3bcb), -W64LIT(0x4b7dd49c4f551849), -W64LIT(0x4c638f485dc966be), -W64LIT(0xcfc3a6b6bd5dd9f6), -W64LIT(0x46d90a2b615ad2af), -W64LIT(0x8565f9dff4e5d347), -W64LIT(0x94b9bed292851497), -W64LIT(0xfa97bf80038c097c), -W64LIT(0xb9130d607c658121), -W64LIT(0xdc5c02a4d7123a23), -W64LIT(0x224d8e1accc07b55), -W64LIT(0x87261ac0f8caf742), -W64LIT(0xd901ba6fc9a160d1), -W64LIT(0xab57228710c7700c), -W64LIT(0x21d5e6f0c6024da8), -W64LIT(0x98c6eb90ba67cc89), -W64LIT(0x827ba20be679adb0), -W64LIT(0x991d6065bc8ade71), -W64LIT(0x5546ae390b15317a), -W64LIT(0xa56b94da340a8c17), -W64LIT(0x071e5bd4129c7ef7), -W64LIT(0xe02af61b5f926845), -W64LIT(0x6b73b9998fba4719), -W64LIT(0xdfc46a4eddd00cde), -W64LIT(0x770b2023c7d54a2f), -W64LIT(0x7e29cdaaf184c8c3), -W64LIT(0xba8b658a76a7b7dc), -W64LIT(0x9c40d8aea2398483), -W64LIT(0x9fd8b044a8fbb27e), -W64LIT(0xdb425970c58e44d4), -W64LIT(0xe269150453bd4c40), -W64LIT(0x3c76f4bf88805266), -W64LIT(0xf1f6b11639f2af95), -W64LIT(0x549d25cc0df82382), -W64LIT(0x4db804bd5b247446), -W64LIT(0x8a82c477d6c53da4), -W64LIT(0x5258f5ed19894f8d), -W64LIT(0x6e2e015291091deb), -W64LIT(0xc1ff10eb999025ed), -W64LIT(0xbd953e5e643bc92b), -W64LIT(0xc8ddfd62afc1a701), -W64LIT(0x5c6443b03d44b396), -W64LIT(0x6c6de24d9d2639ee), -W64LIT(0x1481ffc678d39d22), -W64LIT(0xd1f8dc13f91df0c5), -W64LIT(0xca9e1e7da3ee8304), -W64LIT(0xdd878951d1ff28db), -W64LIT(0x6012b70fb5c4e1f0), -W64LIT(0x1b66c26e5af373c1), -W64LIT(0xe3b29ef155505eb8), -W64LIT(0x70157bf7d54934d8), -W64LIT(0x2e32db58e422a34b), -W64LIT(0x6aa8326c895755e1), -W64LIT(0xb6f430c85e456fc2), -W64LIT(0xfd89e4541110778b), -W64LIT(0x88c12768daea19a1), -W64LIT(0xcd8045a9b172fdf3), -/* box 3 */ -W64LIT(0x99183e616655b742), -W64LIT(0xb2872032a50d6860), -W64LIT(0x0946f63b060528ef), -W64LIT(0x36612b9a141ef07d), -W64LIT(0x0634da84dd49579b), -W64LIT(0xfc9c9e9b486c8a57), -W64LIT(0xa63fe3c0744e6fd0), -W64LIT(0xf1515758d8b46bf9), -W64LIT(0x3e82559fcd5197ff), -W64LIT(0x92e12d262bc40177), -W64LIT(0xc3bb433a5a7752c5), -W64LIT(0x21c3852a5183267a), -W64LIT(0x39130725cf528f09), -W64LIT(0x9ba7db1d2dc12998), -W64LIT(0xc58f99be873e055e), -W64LIT(0xd9d424498f32656c), -W64LIT(0x27f75fae8cca71e1), -W64LIT(0x59b91019a8fc3430), -W64LIT(0xce768af9caafb36b), -W64LIT(0x9d930199f0887e03), -W64LIT(0x63b07a7ef3706a8e), -W64LIT(0xb5167288a70e7096), -W64LIT(0x40cc1a28e967d22e), -W64LIT(0x4d01d3eb79bf3380), -W64LIT(0x9e896cdb6456afb4), -W64LIT(0x2548bad2c75eef3b), -W64LIT(0xa79a6bfeab0420bd), -W64LIT(0x9f2ce4e5bb1ce0d9), -W64LIT(0x32ea146282c3393c), -W64LIT(0x6d67defff7765a97), -W64LIT(0x83775912b31080eb), -W64LIT(0xf5da68a04e69a2b8), -W64LIT(0x1196743498d4819c), -W64LIT(0x0bf913474d91b635), -W64LIT(0x43d6776a7db90399), -W64LIT(0x444725d07fba1b6f), -W64LIT(0x6584a0fa2e393d15), -W64LIT(0x3f27dda1121bd892), -W64LIT(0xf6c005e2dab7730f), -W64LIT(0x56cb3ca673b04b44), -W64LIT(0x642128c4f1737278), -W64LIT(0xbf4ae9f135d589ce), -W64LIT(0xb038c54eee99f6ba), -W64LIT(0xf47fe09e9123edd5), -W64LIT(0x75b75cf069a7f3e4), -W64LIT(0xd419ed8a1fea84c2), -W64LIT(0x73838674b4eea47f), -W64LIT(0x498aec13ef62fac1), -W64LIT(0x20660d148ec96917), -W64LIT(0xa48006bc3fdaf10a), -W64LIT(0x2f1421ab55851663), -W64LIT(0x0a5c9b7992dbf958), -W64LIT(0xd1375a4c567d02ee), -W64LIT(0x0000000000000000), -W64LIT(0xc842507d17e6e4f0), -W64LIT(0xf3eeb2249320f523), -W64LIT(0xc9e7d843c8acab9d), -W64LIT(0xff86f3d9dcb25be0), -W64LIT(0xb4b3fab678443ffb), -W64LIT(0xb19d4d7031d3b9d7), -W64LIT(0x79df1d0d26355d27), -W64LIT(0x8eba90d123c86145), -W64LIT(0xaa57a23d3bdcc113), -W64LIT(0xcb583d3f83383547), -W64LIT(0xd871ac7750782a01), -W64LIT(0xe162ab529f2aa508), -W64LIT(0x38b68f1b1018c064), -W64LIT(0x237c60561a17b8a0), -W64LIT(0xa31154063dd9e9fc), -W64LIT(0x713c6308ff7a3aa5), -W64LIT(0x1a6f6773d54537a9), -W64LIT(0x08e37e05d94f6782), -W64LIT(0x357b46d880c021ca), -W64LIT(0x6cc256c1283c15fa), -W64LIT(0xcfd302c715e5fc06), -W64LIT(0xbdf50c8d7e411714), -W64LIT(0x7cf1aacb6fa2db0b), -W64LIT(0x5240035ee56d8205), -W64LIT(0x7b60f8716da1c3fd), -W64LIT(0x01a5883edf4a4f6d), -W64LIT(0xdd5f1bb119efac2d), -W64LIT(0x5474d9da3824d59e), -W64LIT(0x0f722cbfdb4c7f74), -W64LIT(0x17a2aeb0459dd607), -W64LIT(0x37c4a3a4cb54bf10), -W64LIT(0xc21ecb04853d1da8), -W64LIT(0x4273ff54a2f34cf4), -W64LIT(0xdace490b1becb4db), -W64LIT(0x6af68c45f5754261), -W64LIT(0x46f8c0ac342e85b5), -W64LIT(0x854383966e59d770), -W64LIT(0x81c8bc6ef8841e31), -W64LIT(0x3bace25984c611d3), -W64LIT(0x1033fc0a479ecef1), -W64LIT(0x1c5bbdf7080c6032), -W64LIT(0x7412d4ceb6edbc89), -W64LIT(0xa8e8474170485fc9), -W64LIT(0xb8dbbb4b37d69138), -W64LIT(0x079152ba020318f6), -W64LIT(0x72260e4a6ba4eb12), -W64LIT(0x905ec85a60509fad), -W64LIT(0x2dabc4d71e1188b9), -W64LIT(0xd092d27289374d83), -W64LIT(0x610f9f02b8e4f454), -W64LIT(0x02bfe57c4b949eda), -W64LIT(0x95707f9c29c71981), -W64LIT(0x6fd83b83bce2c44d), -W64LIT(0x5d322fe13e21fd71), -W64LIT(0x34decee65f8a6ea7), -W64LIT(0xcd6ce7bb5e7162dc), -W64LIT(0xfb0dcc214a6f92a1), -W64LIT(0x2eb1a9958acf590e), -W64LIT(0xdcfa938fc6a5e340), -W64LIT(0x669ecdb8bae7eca2), -W64LIT(0x151d4bcc0e0948dd), -W64LIT(0xfd3916a59726c53a), -W64LIT(0x581c982777b67b5d), -W64LIT(0x1bcaef4d0a0f78c4), -W64LIT(0xdfe0fecd527b32f7), -W64LIT(0x128c19760c0a502b), -W64LIT(0x84e60ba8b113981d), -W64LIT(0x3c3db0e386c50925), -W64LIT(0x7febc789fb7c0abc), -W64LIT(0x7d5422f5b0e89466), -W64LIT(0xd70380c88b345575), -W64LIT(0xbbc1d609a308408f), -W64LIT(0xe278c6100bf474bf), -W64LIT(0x5e2842a3aaff2cc6), -W64LIT(0x6b53047b2a3f0d0c), -W64LIT(0xf7658ddc05fd3c62), -W64LIT(0x9a025323f28b66f5), -W64LIT(0x8c0575ad685cff9f), -W64LIT(0x76ad31b2fd792253), -W64LIT(0x68496939bee1dcbb), -W64LIT(0x7e4e4fb7243645d1), -W64LIT(0xe44c1c94d6bd2324), -W64LIT(0xbeef61cfea9fc6a3), -W64LIT(0x91fb4064bf1ad0c0), -W64LIT(0x052eb7c64997862c), -W64LIT(0x4a9081517bbc2b76), -W64LIT(0x8f1f18effc822e28), -W64LIT(0x3a096a675b8c5ebe), -W64LIT(0xee1087ed4466da7c), -W64LIT(0x2652d79053803e8c), -W64LIT(0x7099eb36203075c8), -W64LIT(0xc7307cc2ccaa9b84), -W64LIT(0x5c97a7dfe16bb21c), -W64LIT(0x50ffe622aef91cdf), -W64LIT(0x8da0fd93b716b0f2), -W64LIT(0x69ece10761ab93d6), -W64LIT(0x31f07920161de88b), -W64LIT(0x13299148d3401f46), -W64LIT(0x031a6d4294ded1b7), -W64LIT(0xccc96f85813b2db1), -W64LIT(0x14b8c3f2d14307b0), -W64LIT(0x8659eed4fa8706c7), -W64LIT(0xba645e377c420fe2), -W64LIT(0x2920fb2f88cc41f8), -W64LIT(0x87fc66ea25cd49aa), -W64LIT(0x1ee4588b4398fee8), -W64LIT(0xecaf62910ff244a6), -W64LIT(0xf817a163deb14316), -W64LIT(0x45e2adeea0f05402), -W64LIT(0x806d345027ce515c), -W64LIT(0x576eb498acfa0429), -W64LIT(0xa5258e82e090be67), -W64LIT(0x892bc26b21cb79b3), -W64LIT(0x6e7db3bd63a88b20), -W64LIT(0x4e1bbea9ed61e237), -W64LIT(0xadc6f08739dfd9e5), -W64LIT(0x8b9427176a5fe769), -W64LIT(0xa1aeb17a764d7726), -W64LIT(0x4b35096fa4f6641b), -W64LIT(0x22d9e868c55df7cd), -W64LIT(0x55d151e4e76e9af3), -W64LIT(0x966a12debd19c836), -W64LIT(0x0dcdc9c390d8e1ae), -W64LIT(0xf24b3a1a4c6aba4e), -W64LIT(0x24ed32ec1814a056), -W64LIT(0xaf7915fb724b473f), -W64LIT(0x2885731157860e95), -W64LIT(0x9c3689a72fc2316e), -W64LIT(0x475d4892eb64cad8), -W64LIT(0xac6378b9e6959688), -W64LIT(0xa00b3944a907384b), -W64LIT(0xc695f4fc13e0d4e9), -W64LIT(0x3055f11ec957a7e6), -W64LIT(0x6215f2402c3a25e3), -W64LIT(0xde4576f38d317d9a), -W64LIT(0x9344a518f48e4e1a), -W64LIT(0x82d2d12c6c5acf86), -W64LIT(0xefb50fd39b2c9511), -W64LIT(0xe981d5574665c28a), -W64LIT(0x5f8dca9d75b563ab), -W64LIT(0xb60c1fca33d0a121), -W64LIT(0xfe237be703f8148d), -W64LIT(0xd6a608f6547e1a18), -W64LIT(0xb97e3375e89cde55), -W64LIT(0xd388bf301de99c34), -W64LIT(0x5b06f565e368aaea), -W64LIT(0xf0f4df6607fe2494), -W64LIT(0x1607268e9ad7996a), -W64LIT(0xaedc9dc5ad010852), -W64LIT(0xe0c7236c4060ea65), -W64LIT(0xea9bb815d2bb133d), -W64LIT(0x888e4a55fe8136de), -W64LIT(0x5aa37d5b3c22e587), -W64LIT(0xc104a64611e3cc1f), -W64LIT(0x515a6e1c71b353b2), -W64LIT(0xc42a118058744a33), -W64LIT(0x7708b98c22336d3e), -W64LIT(0x2a3a966d1c12904f), -W64LIT(0x8a31af29b515a804), -W64LIT(0xed0aeaafd0b80bcb), -W64LIT(0x2c0e4ce9c15bc7d4), -W64LIT(0x0c6841fd4f92aec3), -W64LIT(0x98bdb65fb91ff82f), -W64LIT(0x1f41d0b59cd2b185), -W64LIT(0xb322a80c7a47270d), -W64LIT(0xe6f3f9e89d29bdfe), -W64LIT(0x7ac5704fb2eb8c90), -W64LIT(0xa94dcf7faf0210a4), -W64LIT(0x787a9533f97f124a), -W64LIT(0xdb6bc135c4a6fbb6), -W64LIT(0x048b3ff896ddc941), -W64LIT(0xe8245d69992f8de7), -W64LIT(0xe3dd4e2ed4be3bd2), -W64LIT(0xcafdb5015c727a2a), -W64LIT(0xb7a997f4ec9aee4c), -W64LIT(0xe75671d64263f293), -W64LIT(0x2b9f1e53c358df22), -W64LIT(0x18d0820f9ed1a973), -W64LIT(0xabf22a03e4968e7e), -W64LIT(0xa2b4dc38e293a691), -W64LIT(0x673b458665ada3cf), -W64LIT(0xf9b2295d01fb0c7b), -W64LIT(0xd22d370ec2a3d359), -W64LIT(0x97cf9ae06253875b), -W64LIT(0x0ed7a48104063019), -W64LIT(0x482f642d3028b5ac), -W64LIT(0xc0a12e78cea98372), -W64LIT(0x4fbe3697322bad5a), -W64LIT(0x19750a31419be61e), -W64LIT(0x41699216362d9d43), -W64LIT(0xd5bc65b4c0a0cbaf), -W64LIT(0xe5e994aa09f76c49), -W64LIT(0xeb3e302b0df15c50), -W64LIT(0x94d5f7a2f68d56ec), -W64LIT(0x53e58b603a27cd68), -W64LIT(0x3d9838dd598f4648), -W64LIT(0x60aa173c67aebb39), -W64LIT(0x1dfe35c9d7462f5f), -W64LIT(0x4ca45bd5a6f57ced), -W64LIT(0xbc5084b3a10b5879), -W64LIT(0xfaa8441f9525ddcc), -W64LIT(0x334f9c5c5d897651), -/* box 4 */ -W64LIT(0xda1687a883adf27e), -W64LIT(0xe35c9378578d9f22), -W64LIT(0x303ca4531637fa40), -W64LIT(0xa088321f74b20375), -W64LIT(0xc9863f3a9acb95e9), -W64LIT(0x5fcf47c57d0b0ed4), -W64LIT(0x4aa211e4e1280b4b), -W64LIT(0xe1a4c9ba871d1289), -W64LIT(0x4926664759f03a4f), -W64LIT(0xadfb36ede3707bca), -W64LIT(0xcf7bd1891f8ef7e1), -W64LIT(0x9735559e8f882792), -W64LIT(0x5932a976f84e6cdc), -W64LIT(0x9dc792bef547818a), -W64LIT(0x06fdeeb385456208), -W64LIT(0x46ad38771ea2cf5b), -W64LIT(0x5eb36aa41543b27b), -W64LIT(0x8b2eb33cd1bcb511), -W64LIT(0x71105ff6e598ebbc), -W64LIT(0x5441ad846f8c1463), -W64LIT(0x4c5fff57646d6943), -W64LIT(0xf3485c49f633c9b1), -W64LIT(0x9cbbbfdf9d0f3d25), -W64LIT(0x22d031a067192178), -W64LIT(0xca0248992213a4ed), -W64LIT(0x19627fb263a9c18f), -W64LIT(0x9330e1efda5dc831), -W64LIT(0x1390b89219666797), -W64LIT(0x2edf18339893e568), -W64LIT(0x6c779435d3e4c590), -W64LIT(0x53c06e568281cac4), -W64LIT(0x6ff3e3966b3cf494), -W64LIT(0xfe3b58bb61f1b10e), -W64LIT(0x77edb14560dd89b4), -W64LIT(0x02f85ac2d0908dab), -W64LIT(0x12ec95f3712edb38), -W64LIT(0x85d9c06dfea6fcaa), -W64LIT(0x90b4964c6285f935), -W64LIT(0xf1b0068b26a3441a), -W64LIT(0x729428555d40dab8), -W64LIT(0x5c4b3066c5d33fd0), -W64LIT(0x5d371d07ad9b837f), -W64LIT(0xa48d866e2167ecd6), -W64LIT(0xb661139d504937ee), -W64LIT(0xa27068dda4228ede), -W64LIT(0xf8c6b608e4b4d306), -W64LIT(0x6bf657e73ee91b37), -W64LIT(0xac871b8c8b38c765), -W64LIT(0x4ea7a595b4fde4e8), -W64LIT(0x0d7304f297c278bf), -W64LIT(0xb71d3efc38018b41), -W64LIT(0xae7f414e5ba84ace), -W64LIT(0xaf036c2f33e0f661), -W64LIT(0x0000000000000000), -W64LIT(0xb89660cc7f537e55), -W64LIT(0xa675dcacf1f7617d), -W64LIT(0x610490c74426bd2f), -W64LIT(0xc18ca2d83094be5a), -W64LIT(0x2adaac42cd460acb), -W64LIT(0x7d1f76651a122fac), -W64LIT(0xc58916a9654151f9), -W64LIT(0xedabe0297897d699), -W64LIT(0x2d5b6f90204bd46c), -W64LIT(0x26d585d132cccedb), -W64LIT(0x9f3fc87c25d70c21), -W64LIT(0xc60d610add9960fd), -W64LIT(0x80a0597dc33bafa6), -W64LIT(0xd0e44088f9625466), -W64LIT(0x1d67cbc3367c2e2c), -W64LIT(0x2c2742f1480368c3), -W64LIT(0x89d6e9fe012c38ba), -W64LIT(0xe9ae54582d42393a), -W64LIT(0x3ecbd702392db3fb), -W64LIT(0xb5e5643ee89106ea), -W64LIT(0xa882affddeed28c6), -W64LIT(0x1ae60811db71f08b), -W64LIT(0x924ccc8eb215749e), -W64LIT(0xfcc30279b1613ca5), -W64LIT(0x825803bf13ab220d), -W64LIT(0xd992f00b3b75c37a), -W64LIT(0xc8fa125bf2832946), -W64LIT(0x35453d432baaa94c), -W64LIT(0xf9ba9b698cfc6fa9), -W64LIT(0x37bd6781fb3a24e7), -W64LIT(0x791ac2144fc7c00f), -W64LIT(0x16e9218224fb349b), -W64LIT(0xdb6aaac9ebe54ed1), -W64LIT(0xd8eedd6a533d7fd5), -W64LIT(0x7c635b04725a9303), -W64LIT(0x553d80e507c4a8cc), -W64LIT(0x9a46516c184a5f2d), -W64LIT(0x14117b40f46bb930), -W64LIT(0x1ee3bc608ea41f28), -W64LIT(0x27a9a8b05a847274), -W64LIT(0x4050d6c49be7ad53), -W64LIT(0x7be298d69f574da4), -W64LIT(0x6a8a7a8656a1a798), -W64LIT(0x4d23d2360c25d5ec), -W64LIT(0x1014cf31a1be5693), -W64LIT(0xb264a7ec059cd84d), -W64LIT(0xea2a23fb959a083e), -W64LIT(0xf0cc2bea4eebf8b5), -W64LIT(0x76919c240895351b), -W64LIT(0x0b8eea4112871ab7), -W64LIT(0x47d1151676ea73f4), -W64LIT(0xbdeff9dc42ce2d59), -W64LIT(0x2ba68123a50eb664), -W64LIT(0x057999103d9d530c), -W64LIT(0xe759270902587081), -W64LIT(0xef53baeba8075b32), -W64LIT(0x4fdb88f4dcb55847), -W64LIT(0x6e8fcef70374483b), -W64LIT(0x1168e250c9f6ea3c), -W64LIT(0x1b9a2570b3394c24), -W64LIT(0x706c72978dd05713), -W64LIT(0x865db7ce467ecdae), -W64LIT(0x52bc4337eac9766b), -W64LIT(0x504419f53a59fbc0), -W64LIT(0x8f2b074d84695ab2), -W64LIT(0x6078bda62c6e0180), -W64LIT(0x43d4a167233f9c57), -W64LIT(0x0ef773512f1a49bb), -W64LIT(0x0c0f2993ff8ac410), -W64LIT(0x4bde3c858960b7e4), -W64LIT(0x66855315a92b6388), -W64LIT(0xd360372b41ba6562), -W64LIT(0x584e84179006d073), -W64LIT(0x9b3a7c0d7002e382), -W64LIT(0xa5f1ab0f492f5079), -W64LIT(0x2822f6801dd68760), -W64LIT(0x445562b5ce3242f0), -W64LIT(0xaa7af53f0e7da56d), -W64LIT(0x3c338dc0e9bd3e50), -W64LIT(0x3bb24e1204b0e0f7), -W64LIT(0xd59dd998c4ff076a), -W64LIT(0x91c8bb2d0acd459a), -W64LIT(0x84a5ed0c96ee4005), -W64LIT(0x33b8d3f0aeefcb44), -W64LIT(0x57c5da27d7542567), -W64LIT(0x32c4fe91c6a777eb), -W64LIT(0x3439102243e215e3), -W64LIT(0xc7714c6bb5d1dc52), -W64LIT(0x3fb7fa6351650f54), -W64LIT(0x87219aaf2e367101), -W64LIT(0xf5b5b2fa7376abb9), -W64LIT(0x412cfba5f3af11fc), -W64LIT(0xdceb691b06e89076), -W64LIT(0xbb12176fc78b4f51), -W64LIT(0x73e8053435086617), -W64LIT(0xe220be193fc5238d), -W64LIT(0xb09cfd2ed50c55e6), -W64LIT(0xb9ea4dad171bc2fa), -W64LIT(0x9e43e51d4d9fb08e), -W64LIT(0x36c14ae093729848), -W64LIT(0xa9fe829cb6a59469), -W64LIT(0x0405b47155d5efa3), -W64LIT(0x0af2c7207acfa618), -W64LIT(0x7e9b01c6a2ca1ea8), -W64LIT(0xdd97447a6ea02cd9), -W64LIT(0x0781c3d2ed0ddea7), -W64LIT(0x7866ef75278f7ca0), -W64LIT(0xd1986de9912ae8c9), -W64LIT(0xcb7e65f84a5b1842), -W64LIT(0xcd838b4bcf1e7a4a), -W64LIT(0xab06d85e663519c2), -W64LIT(0xd4e1f4f9acb7bbc5), -W64LIT(0xfdbf2f18d929800a), -W64LIT(0xf23471289e7b751e), -W64LIT(0xbc93d4bd2a8691f6), -W64LIT(0x3d4fa0a181f582ff), -W64LIT(0xba6e3a0eafc3f3fe), -W64LIT(0x5ab6ded540965dd8), -W64LIT(0xeb560e9afdd2b491), -W64LIT(0x0976b083c217971c), -W64LIT(0xecd7cd4810df6a36), -W64LIT(0x23ac1cc10f519dd7), -W64LIT(0xbe6b8e7ffa161c5d), -W64LIT(0x7fe72ca7ca82a207), -W64LIT(0xc0f08fb958dc02f5), -W64LIT(0x7a9eb5b7f71ff10b), -W64LIT(0xa709f1cd99bfddd2), -W64LIT(0x8dd35d8f54f9d719), -W64LIT(0x8caf70ee3cb16bb6), -W64LIT(0xe4dd50aaba804185), -W64LIT(0x83242ede7be39ea2), -W64LIT(0x98be0baec8dad286), -W64LIT(0x690e0d25ee79969c), -W64LIT(0x95cd0f5c5f18aa39), -W64LIT(0x56b9f746bf1c99c8), -W64LIT(0x7469c6e6d805b8b0), -W64LIT(0x8a529e5db9f409be), -W64LIT(0xe6250a686a10cc2e), -W64LIT(0x2fa33552f0db59c7), -W64LIT(0x42a88c064b7720f8), -W64LIT(0x6d0bb954bbac793f), -W64LIT(0x181e52d30be17d20), -W64LIT(0xbf17a31e925ea0f2), -W64LIT(0x94b1223d37501696), -W64LIT(0xe8d27939450a8595), -W64LIT(0xccffa62aa756c6e5), -W64LIT(0x383639b1bc68d1f3), -W64LIT(0xee2f978ac04fe79d), -W64LIT(0xa30c45bccc6a3271), -W64LIT(0x1f9f9101e6eca387), -W64LIT(0xb1e0d04fbd44e949), -W64LIT(0x242ddf13e25c4370), -W64LIT(0x156d56219c23059f), -W64LIT(0x88aac49f69648415), -W64LIT(0x6280e764fcfe8c2b), -W64LIT(0xdf6f1eb8be30a172), -W64LIT(0xe5a17dcbd2c8fd2a), -W64LIT(0xe0d8e4dbef55ae26), -W64LIT(0x63fcca0594b63084), -W64LIT(0xa1f41f7e1cfabfda), -W64LIT(0x295edbe1759e3bcf), -W64LIT(0x67f97e74c163df27), -W64LIT(0x038477a3b8d83104), -W64LIT(0xde1333d9d6781ddd), -W64LIT(0x3ace63736cf85c58), -W64LIT(0xd619ae3b7c27366e), -W64LIT(0x5bcaf3b428dee177), -W64LIT(0xb3188a8d6dd464e2), -W64LIT(0x1c1be6a25e349283), -W64LIT(0x017c2d616848bcaf), -W64LIT(0x8e572a2cec21e61d), -W64LIT(0xf631c559cbae9abd), -W64LIT(0x81dc741cab731309), -W64LIT(0xff4775da09b90da1), -W64LIT(0xb499495f80d9ba45), -W64LIT(0x0f8b5e304752f514), -W64LIT(0x394a14d0d4206d5c), -W64LIT(0xce07fce877c64b4e), -W64LIT(0xf4c99f9b1b3e1716), -W64LIT(0xc4f53bc80d09ed56), -W64LIT(0xc208d57b884c8f5e), -W64LIT(0x080a9de2aa5f2bb3), -W64LIT(0x314089327e7f46ef), -W64LIT(0xfa3eecca34245ead), -W64LIT(0x20286b62b789acd3), -W64LIT(0x7515eb87b04d041f), -W64LIT(0x513834945211476f), -W64LIT(0x650124b611f3528c), -W64LIT(0x17950ce34cb38834), -W64LIT(0x45294fd4a67afe5f), -W64LIT(0x21544603dfc1107c), -W64LIT(0x485a4b2631b886e0), -W64LIT(0x6872204486312a33), -W64LIT(0x647d09d779bbee23), -W64LIT(0x2551f2728a14ffdf), -W64LIT(0xd765835a146f8ac1), -W64LIT(0xd21c1a4a29f2d9cd), -W64LIT(0x99c226cfa0926e29), -W64LIT(0xfb42c1ab5c6ce202), -W64LIT(0xc374f81ae00433f1), -W64LIT(0x964978ffe7c09b3d), -W64LIT(0xf74de838a3e62612), -/* box 5 */ -W64LIT(0x74b87b36b0592c6a), -W64LIT(0x3d82d75dffb4b81c), -W64LIT(0x8884246715267825), -W64LIT(0xdaf2d8a77ed4e5de), -W64LIT(0xfeb118650e53f9c7), -W64LIT(0xbd2d1aea59226b06), -W64LIT(0x26ce87f6dbabb191), -W64LIT(0x32772ecbeb66bd0a), -W64LIT(0xd4bbf82bc5104c8c), -W64LIT(0x055357720c4e03a1), -W64LIT(0xef5be62a32d0f6fd), -W64LIT(0xbe1c84c45d186aca), -W64LIT(0xacc7e4a565a1643c), -W64LIT(0x8dd7731519687b84), -W64LIT(0x11eafe4f3c830f3a), -W64LIT(0x04ef8e68a358afe5), -W64LIT(0x40ad9ca1534b930d), -W64LIT(0xe44191d4855a5c0e), -W64LIT(0x6001d20b809420f1), -W64LIT(0x73666b70173b8243), -W64LIT(0x372479b9e728beab), -W64LIT(0x45fecbd35f0590ac), -W64LIT(0x7057f55e1301838f), -W64LIT(0xff0dc17fa1455583), -W64LIT(0x0cc467b810e804da), -W64LIT(0xb9c29482fa7ac4e3), -W64LIT(0xa003831d754960e6), -W64LIT(0x8a096353be0ad5ad), -W64LIT(0xdd2cc8e1d9b64bf7), -W64LIT(0xc7dc415052bfee3e), -W64LIT(0x9f0c137421d17572), -W64LIT(0x35a93e8d4c041323), -W64LIT(0x9a5f44062d9f76d3), -W64LIT(0x71eb2c44bc172fcb), -W64LIT(0x0ff5f99614d20516), -W64LIT(0x7789e518b4632da6), -W64LIT(0xc99561dce97b476c), -W64LIT(0x5276fcc06bf29dfb), -W64LIT(0x4a0b32454bd795ba), -W64LIT(0x9274add69e2fddec), -W64LIT(0x4f5865374799961b), -W64LIT(0xb2d8e37c4df06e10), -W64LIT(0xc4eddf7e5685eff2), -W64LIT(0xb3643a66e2e6c254), -W64LIT(0xd50721316a06e0c8), -W64LIT(0x8bb5ba49111c79e9), -W64LIT(0x2bb639546455190f), -W64LIT(0xf8d3d1390627fbaa), -W64LIT(0x38d1802ff3fabbbd), -W64LIT(0xdfa18fd5729ae67f), -W64LIT(0x4ee4bc2de88f3a5f), -W64LIT(0xf72628af12f5febc), -W64LIT(0x0aa6aee4189c06b7), -W64LIT(0x0000000000000000), -W64LIT(0x9eb0ca6e8ec7d936), -W64LIT(0xcb1826e84257eae4), -W64LIT(0x187dce8520250841), -W64LIT(0xc28f16225ef1ed9f), -W64LIT(0xc333cf38f1e741db), -W64LIT(0x4220db95f8673e85), -W64LIT(0xdc9011fb76a0e7b3), -W64LIT(0x105627559395a37e), -W64LIT(0x2f59b73cc70db6ea), -W64LIT(0xe112c6a689145faf), -W64LIT(0x82228a830dba7e92), -W64LIT(0x2ee56e26681b1aae), -W64LIT(0x2a0ae04ecb43b54b), -W64LIT(0x47738ce7f4293d24), -W64LIT(0xa7dd935bd22bcecf), -W64LIT(0xd2d93177cd644ee1), -W64LIT(0xebb4684291885918), -W64LIT(0x0e49208cbbc4a952), -W64LIT(0xa550d46f79076347), -W64LIT(0x411145bbfc5d3f49), -W64LIT(0xe6ccd6e02e76f186), -W64LIT(0x4bb7eb5fe4c139fe), -W64LIT(0x5d8305567f2098ed), -W64LIT(0x95aabd90394d73c5), -W64LIT(0x25ff19d8df91b05d), -W64LIT(0x86cd04ebaee2d177), -W64LIT(0x03319e2e043a01cc), -W64LIT(0x6b1ba5f5371e8a02), -W64LIT(0x76353c021b7581e2), -W64LIT(0x64ee5c6323cc8f14), -W64LIT(0x5c3fdc4cd03634a9), -W64LIT(0x6996e2c19c32278a), -W64LIT(0x8938fd7dba30d461), -W64LIT(0x7b4d82a0a48b297c), -W64LIT(0xbfa05ddef20ec68e), -W64LIT(0x8ee6ed3b1d527a48), -W64LIT(0x61bd0b112f828cb5), -W64LIT(0x66631b5788e0229c), -W64LIT(0x55a8ec86cc9033d2), -W64LIT(0x1c9240ed837da7a4), -W64LIT(0x150570279fdba0df), -W64LIT(0x53ca25dac4e431bf), -W64LIT(0xd636bf1f6e3ce104), -W64LIT(0xcaa4fff2ed4146a0), -W64LIT(0x787c1c8ea0b128b0), -W64LIT(0xad7b3dbfcab7c878), -W64LIT(0xfc3c5f51a57f544f), -W64LIT(0xb78bb40e41be6db1), -W64LIT(0x8c6baa0fb67ed7c0), -W64LIT(0xce4b719a4e19e945), -W64LIT(0xf96f0823a93157ee), -W64LIT(0x7d2f4bfcacff2b11), -W64LIT(0x3eb34973fb8eb9d0), -W64LIT(0xe39f81922238f227), -W64LIT(0x239dd084d7e5b230), -W64LIT(0x1fa3dec38747a668), -W64LIT(0xc5510664f99343b6), -W64LIT(0xc829b8c6466deb28), -W64LIT(0x85fc9ac5aad8d0bb), -W64LIT(0xb6376d14eea8c1f5), -W64LIT(0x9d8154408afdd8fa), -W64LIT(0x3be01e01f7c0ba71), -W64LIT(0x628c953f2bb88d79), -W64LIT(0x6d796ca93f6a886f), -W64LIT(0xfa5e960dad0b5622), -W64LIT(0xe5fd48ce2a4cf04a), -W64LIT(0xe7700ffa81605dc2), -W64LIT(0x2dd4f0086c211b62), -W64LIT(0x2221099e78f31e74), -W64LIT(0xdb4e01bdd1c2499a), -W64LIT(0xf417b68116cfff70), -W64LIT(0xb506f33aea92c039), -W64LIT(0x514762ee6fc89c37), -W64LIT(0x9c3d8d5a25eb74be), -W64LIT(0x396d59355cec17f9), -W64LIT(0xccc636aee53544cd), -W64LIT(0x0b1a77feb78aaaf3), -W64LIT(0xe9392f763aa4f490), -W64LIT(0xaaa52df96dd56651), -W64LIT(0x46cf55fd5b3f9160), -W64LIT(0xa4ec0d75d611cf03), -W64LIT(0xaff67a8b619b65f0), -W64LIT(0x3415e797e312bf67), -W64LIT(0x7af15bba0b9d8538), -W64LIT(0x811314ad09807f5e), -W64LIT(0x8771ddf101f47d33), -W64LIT(0x969b23be3d777209), -W64LIT(0xd365e86d6272e2a5), -W64LIT(0x58d05224736e9b4c), -W64LIT(0xc660984afda9427a), -W64LIT(0x5414359c63869f96), -W64LIT(0xe885f66c95b258d4), -W64LIT(0x655285798cda2350), -W64LIT(0x6cc5b5b3907c242b), -W64LIT(0x6ff42b9d944625e7), -W64LIT(0xc0025116f5dd4017), -W64LIT(0xa28ec429de65cd6e), -W64LIT(0x63304c2584ae213d), -W64LIT(0x7fa20cc807d38699), -W64LIT(0x996eda2829a5771f), -W64LIT(0x1b4c50ab241f098d), -W64LIT(0x1e1f07d928510a2c), -W64LIT(0x33cbf7d14470114e), -W64LIT(0xb055a448e6dcc398), -W64LIT(0x98d2033286b3db5b), -W64LIT(0xec6a780436eaf731), -W64LIT(0xa1bf5a07da5fcca2), -W64LIT(0xbaf30aacfe40c52f), -W64LIT(0xf144e1f31a81fcd1), -W64LIT(0xe0ae1fbc2602f3eb), -W64LIT(0x14b9a93d30cd0c9b), -W64LIT(0x596c8b3edc783708), -W64LIT(0x682a3bdb33248bce), -W64LIT(0xb87e4d98556c68a7), -W64LIT(0x80afcdb7a696d31a), -W64LIT(0x5725abb267bc9e5a), -W64LIT(0x914533f89a15dc20), -W64LIT(0x5eb29b787b1a9921), -W64LIT(0x01bcd91aaf16ac44), -W64LIT(0xc1be880c5acbec53), -W64LIT(0xedd6a11e99fc5b75), -W64LIT(0x028d4734ab2cad88), -W64LIT(0x8f5a3421b244d60c), -W64LIT(0x4dd52203ecb53b93), -W64LIT(0x3f0f906954981594), -W64LIT(0xae4aa391ce8dc9b4), -W64LIT(0x3698a0a3483e12ef), -W64LIT(0xf5ab6f9bb9d95334), -W64LIT(0x082be9d0b3b0ab3f), -W64LIT(0xd1e8af59c95e4f2d), -W64LIT(0xd87f9f93d5f84856), -W64LIT(0x6e48f2873b5089a3), -W64LIT(0x2443c0c270871c19), -W64LIT(0xb1e97d5249ca6fdc), -W64LIT(0x7c9392e603e98755), -W64LIT(0x839e5399a2acd2d6), -W64LIT(0x19c1179f8f33a405), -W64LIT(0xde1d56cfdd8c4a3b), -W64LIT(0x20ac4eaad3dfb3fc), -W64LIT(0x1af089b18b09a5c9), -W64LIT(0x3a5cc71b58d61635), -W64LIT(0x444212c9f0133ce8), -W64LIT(0x72dab26ab82d2e07), -W64LIT(0x4c69fb1943a397d7), -W64LIT(0xf3c9a6c7b1ad5159), -W64LIT(0x1d2e99f72c6b0be0), -W64LIT(0xb4ba2a2045846c7d), -W64LIT(0xe22358888d2e5e63), -W64LIT(0x2887a77a606f18c3), -W64LIT(0xa8286acdc6f9cbd9), -W64LIT(0x5f0e4262d40c3565), -W64LIT(0xeee73f309dc65ab9), -W64LIT(0x9be39d1c8289da97), -W64LIT(0x1634ee099be1a113), -W64LIT(0xea08b1583e9ef55c), -W64LIT(0x9727faa49261de4d), -W64LIT(0x2c682912c337b726), -W64LIT(0xcff7a880e10f4501), -W64LIT(0x1788371334f70d57), -W64LIT(0x27725eec74bd1dd5), -W64LIT(0x3146b0e5ef5cbcc6), -W64LIT(0x099730ca1ca6077b), -W64LIT(0xf2757fdd1ebbfd1d), -W64LIT(0x6aa77cef98082646), -W64LIT(0xbb4fd3b65156696b), -W64LIT(0x569972a8c8aa321e), -W64LIT(0xa3321d337173612a), -W64LIT(0x50fbbbf4c0de3073), -W64LIT(0x5a5d1510d84236c4), -W64LIT(0xfd80864b0a69f80b), -W64LIT(0x07de1046a762ae29), -W64LIT(0xa6614a417d3d628b), -W64LIT(0xd78a6605c12a4d40), -W64LIT(0x67dfc24d27f68ed8), -W64LIT(0xbc91c3f0f634c742), -W64LIT(0xd05476436648e369), -W64LIT(0x493aac6b4fed9476), -W64LIT(0x12db606138b90ef6), -W64LIT(0xa994b3d769ef679d), -W64LIT(0x211097b07cc91fb8), -W64LIT(0x30fa69ff404a1082), -W64LIT(0x3c3e0e4750a21458), -W64LIT(0x7504a22c1f4f802e), -W64LIT(0x844043df05ce7cff), -W64LIT(0xf0f838e9b5975095), -W64LIT(0x7e1ed5d2a8c52add), -W64LIT(0x90f9eae235037064), -W64LIT(0x0662c95c0874026d), -W64LIT(0x9416648a965bdf81), -W64LIT(0xf69af1b5bde352f8), -W64LIT(0x0d78bea2bffea89e), -W64LIT(0x293b7e60cf79b487), -W64LIT(0xd9c346897aeee412), -W64LIT(0xfbe24f17021dfa66), -W64LIT(0x1367b97b97afa2b2), -W64LIT(0xab19f4e3c2c3ca15), -W64LIT(0x48867571e0fb3832), -W64LIT(0x93c874cc313971a8), -W64LIT(0x79c0c5940fa784f4), -W64LIT(0xcd7aefb44a23e889), -W64LIT(0x439c028f577192c1), -W64LIT(0x5be1cc0a77549a80), -/* box 6 */ -W64LIT(0x714d28d778656928), -W64LIT(0xc88a7c6b84f64f7c), -W64LIT(0xec43cac5ab89aaca), -W64LIT(0x777fa38110dc16a3), -W64LIT(0x0f7d5c87e4213b5c), -W64LIT(0x73f051e5f3a1ef51), -W64LIT(0xea714193c330d541), -W64LIT(0x95e5f3dae016c4f3), -W64LIT(0x63d3738095a0e173), -W64LIT(0x9825d66f8ff379d6), -W64LIT(0xe8cc38a148f45338), -W64LIT(0xa840b0c025f06bb0), -W64LIT(0x944135c35f748735), -W64LIT(0x74661caa247ad31c), -W64LIT(0xe7b16426acd56864), -W64LIT(0xd1e689df6e6f0589), -W64LIT(0xa73dec47c1d150ec), -W64LIT(0x64453ecf427bdd3e), -W64LIT(0x0ed99a9e5b43789a), -W64LIT(0x7b1b402dc05be840), -W64LIT(0x0dc025b56fe5bd25), -W64LIT(0x3f183a284e22293a), -W64LIT(0xa0aba108160a6ca1), -W64LIT(0x46be033705bd4703), -W64LIT(0x86df6e94b2b10f6e), -W64LIT(0xa216d83a9dceead8), -W64LIT(0x129e5b57edc5885b), -W64LIT(0x7e3074509c445274), -W64LIT(0x7d29cb7ba8e297cb), -W64LIT(0x1611a9330eb871a9), -W64LIT(0x486799a95efe3f99), -W64LIT(0x9fb39b205828459b), -W64LIT(0xd0424fc6d10d464f), -W64LIT(0xe968feb8f79610fe), -W64LIT(0x5d6f8fb164e08b8f), -W64LIT(0xaafdc9f2ae34edc9), -W64LIT(0x02bd79328bc48679), -W64LIT(0x9b3c6944bb55bc69), -W64LIT(0x6277b5992ac2a2b5), -W64LIT(0x877ba88d0dd34ca8), -W64LIT(0xfa5263f6a531db63), -W64LIT(0x2e9fde54974164de), -W64LIT(0xcda14816d8e9f548), -W64LIT(0x675c81e476dd1881), -W64LIT(0x2a102c30743c9d2c), -W64LIT(0x37f32be07dd82e2b), -W64LIT(0x256d70b7901da670), -W64LIT(0x4ce86bcdbd83c66b), -W64LIT(0x50afaa040b0536aa), -W64LIT(0xef5a75ee9f2f6f75), -W64LIT(0xb3913c4644ada73c), -W64LIT(0x1187e47cd9634de4), -W64LIT(0xc54a59deeb13f259), -W64LIT(0x0000000000000000), -W64LIT(0x01a4c619bf6243c6), -W64LIT(0x90cec7a7bc097ec7), -W64LIT(0xf94bdcdd91971edc), -W64LIT(0x8e347f5c814b087f), -W64LIT(0xc7f720ec60d77420), -W64LIT(0x354e52d2f61ca852), -W64LIT(0x34ea94cb497eeb94), -W64LIT(0xae723b964d49143b), -W64LIT(0xf48bf968fe72a3f9), -W64LIT(0xfc60e8a0cd88a4e8), -W64LIT(0x2909931b409a5893), -W64LIT(0xbd48a6d81feedfa6), -W64LIT(0x6cae2f077181da2f), -W64LIT(0xad6b84bd79efd184), -W64LIT(0x18c833ad55fb0933), -W64LIT(0x204644cacc021c44), -W64LIT(0x392ab17e269b56b1), -W64LIT(0x14acd001857cf7d0), -W64LIT(0x8abb8d386236f18d), -W64LIT(0xeefeb3f7204d2cb3), -W64LIT(0xf636805a75b62580), -W64LIT(0x2bb4ea29cb5edeea), -W64LIT(0xc653e6f5dfb537e6), -W64LIT(0x8d2dc077b5edcdc0), -W64LIT(0x31c1a0b6156151a0), -W64LIT(0xf8ef1ac42ef55d1a), -W64LIT(0xdbb0e125d65184e1), -W64LIT(0x82509cf051ccf69c), -W64LIT(0xe33e96424fa89196), -W64LIT(0xdf3f1341352c7d13), -W64LIT(0x8f90b9453e294bb9), -W64LIT(0x1023226566010e22), -W64LIT(0xa58095754a15d695), -W64LIT(0x2c22a7661c85e2a7), -W64LIT(0xe183ef70c46c17ef), -W64LIT(0xafd6fd8ff22b57fd), -W64LIT(0x471ac52ebadf04c5), -W64LIT(0x4d4cadd402e185ad), -W64LIT(0x916a01be036b3d01), -W64LIT(0x28ad5502fff81b55), -W64LIT(0x3657edf9c2ba6ded), -W64LIT(0xd2ff36f45ac9c036), -W64LIT(0xf1a0cd15a26d19cd), -W64LIT(0xd90d98175d950298), -W64LIT(0xf7924643cad46646), -W64LIT(0xdd826a73bee8fb6a), -W64LIT(0x9d0ee212d3ecc3e2), -W64LIT(0xb6ba083b18b21d08), -W64LIT(0x3da5431ac5e6af43), -W64LIT(0x08eb11c833fa0711), -W64LIT(0x052b347d5c1fba34), -W64LIT(0x6fb7902c45271f90), -W64LIT(0x133a9d4e52a7cb9d), -W64LIT(0x6e135635fa455c56), -W64LIT(0x725497fc4cc3ac97), -W64LIT(0xf31db42729a99fb4), -W64LIT(0x846217a639758917), -W64LIT(0x4b7e26826a58fa26), -W64LIT(0x235ffbe1f8a4d9fb), -W64LIT(0xff79578bf92e6157), -W64LIT(0xda14273c6933c727), -W64LIT(0x8b1f4b21dd54b24b), -W64LIT(0x9caa240b6c8e8024), -W64LIT(0xc1c5abba086e0bab), -W64LIT(0xde9bd5588a4e3ed5), -W64LIT(0x2d86617fa3e7a161), -W64LIT(0xbff5dfea942a59df), -W64LIT(0x66f847fdc9bf5b47), -W64LIT(0x3b97c84cad5fd0c8), -W64LIT(0x3ebcfc31f1406afc), -W64LIT(0xca3705590f32c905), -W64LIT(0x24c9b6ae2f7fe5b6), -W64LIT(0x408c88616d043888), -W64LIT(0x93d7788c88afbb78), -W64LIT(0x196cf5b4ea994af5), -W64LIT(0x9a98af5d0437ffaf), -W64LIT(0x8c89066e0a8f8e06), -W64LIT(0xab590feb1156ae0f), -W64LIT(0xd7d4028906d67a02), -W64LIT(0xe4a8db0d9873addb), -W64LIT(0xc378d28883aa8dd2), -W64LIT(0x4ff1d4e6892503d4), -W64LIT(0xd670c490b9b439c4), -W64LIT(0x65e1f8d6fd199ef8), -W64LIT(0xf2b9723e96cbdc72), -W64LIT(0xb12c4574cf692145), -W64LIT(0x569d215263bc4921), -W64LIT(0x69851b7a2d9e601b), -W64LIT(0x5e76309a50464e30), -W64LIT(0x5fd2f683ef240df6), -W64LIT(0xd8a95e0ee2f7415e), -W64LIT(0xe29a505bf0cad250), -W64LIT(0x96fc4cf1d4b0014c), -W64LIT(0x8806f40ae9f277f4), -W64LIT(0x53b6152f3fa3f315), -W64LIT(0x1c47c1c9b686f0c1), -W64LIT(0x80ede5c2da0870e5), -W64LIT(0xd5697bbb8d12fc7b), -W64LIT(0xfdc42eb972eae72e), -W64LIT(0x0bf2aee3075cc2ae), -W64LIT(0x22fb3df847c69a3d), -W64LIT(0xbadeeb97c835e3eb), -W64LIT(0xdc26ac6a018ab8ac), -W64LIT(0xbcec60c1a08c9c60), -W64LIT(0x4231f153e6c0bef1), -W64LIT(0x337cd9849ea5d7d9), -W64LIT(0x5b5d04e70c59f404), -W64LIT(0x79a6391f4b9f6e39), -W64LIT(0x5212d33680c1b0d3), -W64LIT(0xb5a3b7102c14d8b7), -W64LIT(0x7f94b249232611b2), -W64LIT(0x17b56f2ab1da326f), -W64LIT(0x59e07dd5879d727d), -W64LIT(0xebd5878a7c529687), -W64LIT(0xbb7a2d8e7757a02d), -W64LIT(0x0319bf2b34a6c5bf), -W64LIT(0x5ccb49a8db82c849), -W64LIT(0x1de307d009e4b307), -W64LIT(0x49c35fb0e19c7c5f), -W64LIT(0x55849e79571a8c9e), -W64LIT(0x7abf86347f39ab86), -W64LIT(0x9273be9537cdf8be), -W64LIT(0xe615a23f13b72ba2), -W64LIT(0x6821dd6392fc23dd), -W64LIT(0x5af9c2feb33bb7c2), -W64LIT(0x06328b5668b97f8b), -W64LIT(0x44037a058e79c17a), -W64LIT(0x83f45ae9eeaeb55a), -W64LIT(0x5739e74bdcde0ae7), -W64LIT(0xfbf6a5ef1a5398a5), -W64LIT(0xe50c1d142711ee1d), -W64LIT(0x1a754a9fde3f8f4a), -W64LIT(0x7802ff06f4fd2dff), -W64LIT(0xf52f3f714110e03f), -W64LIT(0x2674cf9ca4bb63cf), -W64LIT(0x60caccaba10624cc), -W64LIT(0xb088836d700b6283), -W64LIT(0xa6992a5e7eb3132a), -W64LIT(0xa9e476d99a922876), -W64LIT(0x6b386248a65ae662), -W64LIT(0xc2dc14913cc8ce14), -W64LIT(0x76db6598afbe5565), -W64LIT(0x32d81f9d21c7941f), -W64LIT(0x21e282d373605f82), -W64LIT(0xc0616da3b70c486d), -W64LIT(0x616e0ab21e64670a), -W64LIT(0x6d0ae91ecee399e9), -W64LIT(0x27d009851bd92009), -W64LIT(0xfedd9192464c2291), -W64LIT(0x45a7bc1c311b82bc), -W64LIT(0x54205860e878cf58), -W64LIT(0xa10f6711a9682f67), -W64LIT(0x9981107630913a10), -W64LIT(0xede70cdc14ebe90c), -W64LIT(0x70e9eecec7072aee), -W64LIT(0x1f5e7ee28220357e), -W64LIT(0x2f3b184d28232718), -W64LIT(0x41284e78d2667b4e), -W64LIT(0xa424536cf5779553), -W64LIT(0xa3b21e2322aca91e), -W64LIT(0x4e5512ff36474012), -W64LIT(0x1efab8fb3d4276b8), -W64LIT(0x89a2321356903432), -W64LIT(0xcb93c340b0508ac3), -W64LIT(0x306566afaa031266), -W64LIT(0x4adae09bd53ab9e0), -W64LIT(0xc92eba723b940cba), -W64LIT(0x094fd7d18c9844d7), -W64LIT(0xcc058e0f678bb68e), -W64LIT(0xd4cdbda23270bfbd), -W64LIT(0x0a5668fab83e8168), -W64LIT(0x510b6c1db467756c), -W64LIT(0xb86392a543f16592), -W64LIT(0x048ff264e37df9f2), -W64LIT(0x3a330e55123d930e), -W64LIT(0xb235fa5ffbcfe4fa), -W64LIT(0xb9c754bcfc932654), -W64LIT(0x3c0185037a84ec85), -W64LIT(0x0c64e3acd087fee3), -W64LIT(0xe02729697b0e5429), -W64LIT(0x07964d4fd7db3c4d), -W64LIT(0x814923db656a3323), -W64LIT(0x388e776799f91577), -W64LIT(0x6a9ca4511938a5a4), -W64LIT(0x1bd18c86615dcc8c), -W64LIT(0xb407710993769b71), -W64LIT(0x150816183a1eb416), -W64LIT(0x4395374a59a2fd37), -W64LIT(0xc4ee9fc75471b19f), -W64LIT(0x5844bbcc38ff31bb), -W64LIT(0xcf1c3124532d7331), -W64LIT(0xb71ece22a7d05ece), -W64LIT(0xaccf42a4c68d9242), -W64LIT(0x97588ae86bd2428a), -W64LIT(0x75c2dab39b1890da), -W64LIT(0x9e175d39e74a065d), -W64LIT(0xf0040b0c1d0f5a0b), -W64LIT(0xceb8f73dec4f30f7), -W64LIT(0xbe5119f32b481a19), -W64LIT(0xd35bf0ede5ab83f0), -W64LIT(0x7c8d0d621780d40d), -W64LIT(0x85c6d1bf8617cad1), -/* box 7 */ -W64LIT(0xb1c742127b66f2a4), -W64LIT(0xce916098d7a59fc1), -W64LIT(0xc312ef8e2406fa70), -W64LIT(0x956c7dced81403d5), -W64LIT(0x5a0c9b2318dd9520), -W64LIT(0xad0d57f51a480e8b), -W64LIT(0xe7b9d05287740b01), -W64LIT(0x0217f9ea2ed81268), -W64LIT(0x4d7cff19f8cd3a06), -W64LIT(0x44d1772e572b7b67), -W64LIT(0xfb73c5b5e65af72e), -W64LIT(0x91427aef84512705), -W64LIT(0x0c720963e4cf6c85), -W64LIT(0x87c398a0732d8117), -W64LIT(0xa17f5e96fe87620e), -W64LIT(0x50476c8b8e8fcf1d), -W64LIT(0xcb4ee1cc9c8cb225), -W64LIT(0x67b2304c91a8b59a), -W64LIT(0x54696baad2caebcd), -W64LIT(0xddcf03836bf01437), -W64LIT(0x46c68ec479f3690f), -W64LIT(0x8f9f96e2cba7c942), -W64LIT(0xe1802e99f5e93db9), -W64LIT(0x4e9a8086c179215a), -W64LIT(0xf0c9b4686764a427), -W64LIT(0xfd4a3b7e94c7c196), -W64LIT(0xfcbbbd0b83abc8a2), -W64LIT(0xebcbd93163bb6784), -W64LIT(0xf9643c5fc882e546), -W64LIT(0xc4da973041f7c5fc), -W64LIT(0x1af3eb2c13b3ca97), -W64LIT(0x6e1fb87b3e4ef4fb), -W64LIT(0x5e229c024498b1f0), -W64LIT(0xf516353c2c4d89c3), -W64LIT(0xcc869972f97d8da9), -W64LIT(0x8d886f08e57fdb2a), -W64LIT(0x1cca15e7612efc2f), -W64LIT(0x567e9240fc12f9a5), -W64LIT(0x43190f9032da44eb), -W64LIT(0xfeac44e1ad73daca), -W64LIT(0x07c878be65f13f8c), -W64LIT(0x618bce87e3358322), -W64LIT(0xf895ba2adfeeec72), -W64LIT(0x751dd5223a913758), -W64LIT(0x59eae4bc21698e7c), -W64LIT(0xff5dc294ba1fd3fe), -W64LIT(0x03e67f9f39b41b5c), -W64LIT(0x2292c117d1efc7c9), -W64LIT(0x8a4017b6808ee4a6), -W64LIT(0xd1bd0ae08f3f78b2), -W64LIT(0x135e631bbc558bf6), -W64LIT(0xee14586528924a60), -W64LIT(0x8857ee5cae56f6ce), -W64LIT(0x0000000000000000), -W64LIT(0x0e65f089ca177eed), -W64LIT(0x34132358269361db), -W64LIT(0x15679dd0cec8bd4e), -W64LIT(0x800be01e16dcbe9b), -W64LIT(0x949dfbbbcf780ae1), -W64LIT(0xe397d773db312fd1), -W64LIT(0xedf227fa1126513c), -W64LIT(0xb5e945332723d674), -W64LIT(0x53a11314b73bd441), -W64LIT(0x23634762c683cefd), -W64LIT(0x4b4501d28a500cbe), -W64LIT(0x473708b16e9f603b), -W64LIT(0x1770643ae010af26), -W64LIT(0xa746a05d8c1a54b6), -W64LIT(0x90b3fc9a933d2e31), -W64LIT(0x35e2a52d31ff68ef), -W64LIT(0xab34a93e68d53833), -W64LIT(0xd81082d720d939d3), -W64LIT(0xb86aca25d480b3c5), -W64LIT(0xdfd8fa694528065f), -W64LIT(0x4f6b06f3d615286e), -W64LIT(0x578f1435eb7ef091), -W64LIT(0x9af80b32056f740c), -W64LIT(0x92a40570bde53c59), -W64LIT(0xdbf6fd48196d228f), -W64LIT(0x1b026d5904dfc3a3), -W64LIT(0x3c4f2d1a9e19298e), -W64LIT(0xc8a89e53a538a979), -W64LIT(0x991e74ad3cdb6f50), -W64LIT(0x042e07215c4524d0), -W64LIT(0x8e6e1097dccbc076), -W64LIT(0xe071a8ece285348d), -W64LIT(0xd784f42bfda24e0a), -W64LIT(0x7d41db60821b7f0d), -W64LIT(0x85d4614a5df5937f), -W64LIT(0xbb8cb5baed34a899), -W64LIT(0x40ff700f0b6e5fb7), -W64LIT(0x2cf7319e1bf8b924), -W64LIT(0x3a76d3d1ec841f36), -W64LIT(0x4520f15b40477253), -W64LIT(0xf138321d7008ad13), -W64LIT(0x42e889e525b64ddf), -W64LIT(0x65a5c9a6bf70a7f2), -W64LIT(0x208538fdff37d5a1), -W64LIT(0x410ef67a1c025683), -W64LIT(0x18e412c63d6bd8ff), -W64LIT(0x72d5ad9c5f6008d4), -W64LIT(0x255ab9a9b41ef845), -W64LIT(0x93558305aa89356d), -W64LIT(0x70c2547671b81abc), -W64LIT(0x3604dab2084b73b3), -W64LIT(0x05df81544b292de4), -W64LIT(0xf2de4d8249bcb64f), -W64LIT(0x0bba71dd813e5309), -W64LIT(0xa368a77cd05f7066), -W64LIT(0x796fdc41de5e5bdd), -W64LIT(0xec03a18f064a5808), -W64LIT(0x085c0e42b88a4855), -W64LIT(0x274d40439ac6ea2d), -W64LIT(0x31cca20c6dba4c3f), -W64LIT(0x322add93540e5763), -W64LIT(0xb60f3aac1e97cd28), -W64LIT(0x7cb05d1595777639), -W64LIT(0xb036c4676c0afb90), -W64LIT(0x0a4bf7a896525a3d), -W64LIT(0x73242be9480c01e0), -W64LIT(0x5bfd1d560fb19c14), -W64LIT(0x7b7825abf08649b5), -W64LIT(0xb7febcd909fbc41c), -W64LIT(0x81fa666b01b0b7af), -W64LIT(0xd25b757fb68b63ee), -W64LIT(0x0d838f16f3a365b1), -W64LIT(0x6a31bf5a620bd02b), -W64LIT(0x26bcc6368daae319), -W64LIT(0x9ed60c13592a50dc), -W64LIT(0x581b62c936058748), -W64LIT(0x9cc1f5f977f242b4), -W64LIT(0x83ed9f812f68a5c7), -W64LIT(0x74ec53572dfd3e6c), -W64LIT(0xb3d0bbf855bee0cc), -W64LIT(0xacfcd1800d2407bf), -W64LIT(0x303d24797ad6450b), -W64LIT(0x7a89a3dee7ea4081), -W64LIT(0x69d7c0c55bbfcb77), -W64LIT(0x770a2cc814492530), -W64LIT(0x0f9476fcdd7b77d9), -W64LIT(0xaeeb286a23fc15d7), -W64LIT(0x2174be88e85bdc95), -W64LIT(0xde297c1c52440f6b), -W64LIT(0xd04c8c9598537186), -W64LIT(0x2ee0c8743520ab4c), -W64LIT(0x977b8424f6cc11bd), -W64LIT(0x10b81c8485e190aa), -W64LIT(0xa4a0dfc2b5ae4fea), -W64LIT(0x98eff2d82bb76664), -W64LIT(0xa8d2d6a15161236f), -W64LIT(0xd4628bb4c4165556), -W64LIT(0x682646b04cd3c243), -W64LIT(0x2d06b7eb0c94b010), -W64LIT(0x626db118da81987e), -W64LIT(0x2928b0ca50d194c0), -W64LIT(0x6df9c7e407faefa7), -W64LIT(0x1681e24ff77ca612), -W64LIT(0x4952f838a4881ed6), -W64LIT(0x76fbaabd03252c04), -W64LIT(0xc73ce8af7843dea0), -W64LIT(0xe82da6ae5a0f7cd8), -W64LIT(0xc10516640adee818), -W64LIT(0x968a0251e1a01889), -W64LIT(0x37f55cc71f277a87), -W64LIT(0xe5ae29b8a9ac1969), -W64LIT(0xcabf67b98be0bb11), -W64LIT(0xf4e7b3493b2180f7), -W64LIT(0xe9dc20db4d6375ec), -W64LIT(0x639c376dcded914a), -W64LIT(0x12afe56eab3982c2), -W64LIT(0xc2e369fb336af344), -W64LIT(0xa6b726289b765d82), -W64LIT(0x14961ba5d9a4b47a), -W64LIT(0xbc44cd0488c59715), -W64LIT(0xd3aaf30aa1e76ada), -W64LIT(0x28d936bf47bd9df4), -W64LIT(0xaf1aae1f34901ce3), -W64LIT(0x2f114e01224ca278), -W64LIT(0xe648562790180235), -W64LIT(0x24ab3fdca372f171), -W64LIT(0x52509561a057dd75), -W64LIT(0xc6cd6eda6f2fd794), -W64LIT(0xa08ed8e3e9eb6b3a), -W64LIT(0x09ad8837afe64161), -W64LIT(0xbdb54b719fa99e21), -W64LIT(0x8c79e97df213d21e), -W64LIT(0xcf60e6edc0c996f5), -W64LIT(0x5dc4e39d7d2caaac), -W64LIT(0x11499af1928d999e), -W64LIT(0x5fd31a7753f4b8c4), -W64LIT(0x01f18675176c0934), -W64LIT(0xc52b1145569bccc8), -W64LIT(0x9f278a664e4659e8), -W64LIT(0x3dbeab6f897520ba), -W64LIT(0xa2992109c7337952), -W64LIT(0x9b098d4712037d38), -W64LIT(0xc9591826b254a04d), -W64LIT(0x3b8755a4fbe81602), -W64LIT(0xbe5334eea61d857d), -W64LIT(0x51b6eafe99e3c629), -W64LIT(0x191594b32a07d1cb), -W64LIT(0x1f2c6a78589ae773), -W64LIT(0x3fa95285a7ad32d2), -W64LIT(0x5c3565e86a40a398), -W64LIT(0xb2213d8d42d2e9f8), -W64LIT(0xefe5de103ffe4354), -W64LIT(0x4ab487a79d3c058a), -W64LIT(0xcd771f07ee11849d), -W64LIT(0xbfa2b29bb1718c49), -W64LIT(0xba7d33cffa58a1ad), -W64LIT(0x6fee3e0e2922fdcf), -W64LIT(0x64544fd3a81caec6), -W64LIT(0xd9e104a237b530e7), -W64LIT(0xf32fcbf75ed0bf7b), -W64LIT(0x3e58d4f0b0c13be6), -W64LIT(0xb418c346304fdf40), -W64LIT(0xaac52f4b7fb93107), -W64LIT(0xdc3e85f67c9c1d03), -W64LIT(0xd5930dc1d37a5c62), -W64LIT(0x0639fecb729d36b8), -W64LIT(0xc0f490111db2e12c), -W64LIT(0x7ea7a4ffbbaf6451), -W64LIT(0xf6f04aa315f9929f), -W64LIT(0x6643b63986c4bcae), -W64LIT(0x6c0841911096e693), -W64LIT(0x8425e73f4a999a4b), -W64LIT(0x7133d20366d41388), -W64LIT(0x38612a3bc25c0d5e), -W64LIT(0xb99b4c50c3ecbaf1), -W64LIT(0x1d3b93927642f51b), -W64LIT(0x7f56228aacc36d65), -W64LIT(0x9d30738c609e4b80), -W64LIT(0x48a37e4db3e417e2), -W64LIT(0x8bb191c397e2ed92), -W64LIT(0x2acecf5569658f9c), -W64LIT(0xda077b3d0e012bbb), -W64LIT(0xa55159b7a2c246de), -W64LIT(0x33db5be643625e57), -W64LIT(0x821c19f43804acf3), -W64LIT(0x3990ac4ed530046a), -W64LIT(0xd675725eeace473e), -W64LIT(0x789e5a34c93252e9), -W64LIT(0x86321ed564418823), -W64LIT(0xfa8243c0f136fe1a), -W64LIT(0xe45fafcdbec0105d), -W64LIT(0x2b3f49207e0986a8), -W64LIT(0xa92350d4460d2a5b), -W64LIT(0x1eddec0d4ff6ee47), -W64LIT(0x89a66829b93afffa), -W64LIT(0x607a48f2f4598a16), -W64LIT(0x6bc0392f7567d91f), -W64LIT(0xea3a5f4474d76eb0), -W64LIT(0x5598eddfc5a6e2f9), -W64LIT(0x4c8d796cefa13332), -W64LIT(0xf701ccd602959bab), -W64LIT(0xe2665106cc5d26e5), -}; - -const word64 SHARK::Dec::cbox[8][256] = { -/* box 0 */ -W64LIT(0xe6126af05e55aff3), -W64LIT(0x4b6c893f310b0835), -W64LIT(0xaa4c0e84ebfc8d57), -W64LIT(0xfb9b5c7bf3b3090d), -W64LIT(0x4508a6a9ccba5ce2), -W64LIT(0xe5d1d2064dc6bde9), -W64LIT(0x348343755288edde), -W64LIT(0xb684505de46b250c), -W64LIT(0xa8cede205a1e91e8), -W64LIT(0x40b89b46f9fa6acc), -W64LIT(0x8ee1ec1afab080ba), -W64LIT(0xde77d6b7408e0a45), -W64LIT(0x9a3e184c2e455802), -W64LIT(0xbe93fad23f0955ef), -W64LIT(0x3ae76ce3af39b909), -W64LIT(0xad7ee3cf6f5ea7c6), -W64LIT(0x8b51d1f5cff0b694), -W64LIT(0x70ca8d8e3c43bf99), -W64LIT(0xccdba7f8b2a8f6c9), -W64LIT(0x4c5e6474b5a922a4), -W64LIT(0x5d31adcd541ccc32), -W64LIT(0x9b7f701e8c3456a7), -W64LIT(0x2ac9cd08ecfd593a), -W64LIT(0x8fa0844858c18e1f), -W64LIT(0x32f0c66c745bc9ea), -W64LIT(0xc58d6525cbbb888f), -W64LIT(0x8c633cbe4b529c05), -W64LIT(0xf2cd9ea68aa0774b), -W64LIT(0x2cba4811ca2e7d0e), -W64LIT(0xe2e33f4dc9649778), -W64LIT(0xf4be1bbfac73537f), -W64LIT(0x22de6787379f29d9), -W64LIT(0x0956c2dd79137e46), -W64LIT(0xe061efe978868bc7), -W64LIT(0x1cc85ed90f97a85b), -W64LIT(0x31337e9a67c8dbf0), -W64LIT(0x360193d1e36af161), -W64LIT(0x7fefca4a6383e5eb), -W64LIT(0x8535fe633241e243), -W64LIT(0xc3fee03ced68acbb), -W64LIT(0x81c4abdea570dac8), -W64LIT(0x67d6c12efb25753b), -W64LIT(0xa4282112164dd980), -W64LIT(0xcf181f0ea13be4d3), -W64LIT(0xa98fb672f86f9f4d), -W64LIT(0x5c70c59ff66dc297), -W64LIT(0xb0f7d544c2b80138), -W64LIT(0x0da79760ee2246cd), -W64LIT(0x3740fb83411bffc4), -W64LIT(0x24ade29e114c0ded), -W64LIT(0xf858e48de0201b17), -W64LIT(0x0e642f96fdb154d7), -W64LIT(0xddb46e41531d185f), -W64LIT(0x25ec8accb33d0348), -W64LIT(0x0282d0a4b1e21cbf), -W64LIT(0x1bfab3928b3582ca), -W64LIT(0xaffc336bdebcbb79), -W64LIT(0x35c22b27f0f9e37b), -W64LIT(0x03c3b8f61393121a), -W64LIT(0xb8e07fcb19da71db), -W64LIT(0x99fda0ba3dd64a18), -W64LIT(0xce59775c034aea76), -W64LIT(0x49ee599b80e9148a), -W64LIT(0xfe2b6194c6f33f23), -W64LIT(0x4edcb4d0044b3e1b), -W64LIT(0xd5a3c4ce887f68bc), -W64LIT(0xdf36bee5e2ff04e0), -W64LIT(0x171c4ca0c766caa2), -W64LIT(0x0bd41279c8f162f9), -W64LIT(0xe490ba54efb7b34c), -W64LIT(0x5b4228d472cfe806), -W64LIT(0x5355825ba9ad98e5), -W64LIT(0x9f8e25a31b056e2c), -W64LIT(0xcd9acfaa10d9f86c), -W64LIT(0x88926903dc63a48e), -W64LIT(0xb40680f9558939b3), -W64LIT(0x239f0fd595ee277c), -W64LIT(0xec8710db34d5c3af), -W64LIT(0x87b72ec783a3fefc), -W64LIT(0x632794936c144db0), -W64LIT(0x46cb1e5fdf294ef8), -W64LIT(0x83467b7a1492c677), -W64LIT(0x9c4d9d5508967c36), -W64LIT(0xd6607c389bec7aa6), -W64LIT(0x165d24f26517c407), -W64LIT(0xc4cc0d7769ca862a), -W64LIT(0xcbe94ab3360adc58), -W64LIT(0x847496319030ece6), -W64LIT(0x7a5ff7a556c3d3c5), -W64LIT(0xc03d58cafefbbea1), -W64LIT(0x76b908971a909bad), -W64LIT(0x2f79f0e7d9bd6f14), -W64LIT(0x197863363ad79e75), -W64LIT(0xda86830ad7bf32ce), -W64LIT(0x5a034086d0bee6a3), -W64LIT(0x97998f2cc0671ecf), -W64LIT(0x552607428f7ebcd1), -W64LIT(0x51d752ff184f845a), -W64LIT(0xbb23c73d0a4963c1), -W64LIT(0x2b88a55a4e8c579f), -W64LIT(0xd80453ae665d2e71), -W64LIT(0xee05c07f8537df10), -W64LIT(0x423a4be248187673), -W64LIT(0xcaa822e1947bd2fd), -W64LIT(0x1abbdbc029448c6f), -W64LIT(0x96d8e77e6216106a), -W64LIT(0x6266fcc1ce654315), -W64LIT(0x89d301517e12aa2b), -W64LIT(0x730935782fd0ad83), -W64LIT(0x8085c38c0701d46d), -W64LIT(0x6b303e1cb7763d53), -W64LIT(0x3f57510c9a798f27), -W64LIT(0x4449cefb6ecb5247), -W64LIT(0x48af31c922981a2f), -W64LIT(0x98bcc8e89fa744bd), -W64LIT(0x69b2eeb8069421ec), -W64LIT(0xebb5fd90b077e93e), -W64LIT(0x6a71564e150733f6), -W64LIT(0x116fc9b9e1b5ee96), -W64LIT(0x4a2de16d937a0690), -W64LIT(0xb9a11799bbab7f7e), -W64LIT(0x9368da9157562644), -W64LIT(0x718be5dc9e32b13c), -W64LIT(0xc82af2452599ce42), -W64LIT(0xb547e8abf7f83716), -W64LIT(0x33b1ae3ed62ac74f), -W64LIT(0x799c4f534550c1df), -W64LIT(0x3e16395e38088182), -W64LIT(0x7c2c72bc7010f7f1), -W64LIT(0xf38cf6f428d179ee), -W64LIT(0xd29129850cdd422d), -W64LIT(0x41f9f3145b8b6469), -W64LIT(0x945a37dad3f40cd5), -W64LIT(0x757ab061090389b7), -W64LIT(0x6554118a4ac76984), -W64LIT(0x7d6d1aeed261f954), -W64LIT(0x01416852a2710ea5), -W64LIT(0xb27505e0735a1d87), -W64LIT(0x77f860c5b8e19508), -W64LIT(0x78dd2701e721cf7a), -W64LIT(0xe12087bbdaf78562), -W64LIT(0x86f6469521d2f059), -W64LIT(0xef44a82d2746d1b5), -W64LIT(0xbc112a768eeb4950), -W64LIT(0xc2bf886e4f19a21e), -W64LIT(0x307216c8c5b9d555), -W64LIT(0xc96b9a1787e8c0e7), -W64LIT(0xa31acc5992eff311), -W64LIT(0xa0d974af817ce10b), -W64LIT(0xdcf50613f16c16fa), -W64LIT(0xfca9b1307711239c), -W64LIT(0x57a4d7e63e9ca06e), -W64LIT(0xc64eddd3d8289a95), -W64LIT(0xa25ba40b309efdb4), -W64LIT(0x2e3898b57bcc61b1), -W64LIT(0xf5ff73ed0e025dda), -W64LIT(0xa6aaf1b6a7afc53f), -W64LIT(0xd9453bfcc42c20d4), -W64LIT(0x9d0cf507aae77293), -W64LIT(0x290a75feff6e4b20), -W64LIT(0xa7eb99e405decb9a), -W64LIT(0xa1981cfd230defae), -W64LIT(0x12ac714ff226fc8c), -W64LIT(0x743bd833ab728712), -W64LIT(0x6c02d35733d417c2), -W64LIT(0xe9372d340195f581), -W64LIT(0xf77da349bfe04165), -W64LIT(0x68f386eaa4e52f49), -W64LIT(0x211ddf71240c3bc3), -W64LIT(0x13ed191d5057f229), -W64LIT(0xe8764566a3e4fb24), -W64LIT(0xf9198cdf425115b2), -W64LIT(0xd013f921bd3f5e92), -W64LIT(0x91ea0a35e6b43afb), -W64LIT(0x0732ed4b84a22a91), -W64LIT(0xeaf495c21206e79b), -W64LIT(0x5214ea090bdc9640), -W64LIT(0x0000000000000000), -W64LIT(0xb3346db2d12b1322), -W64LIT(0x0ce6ff324c534868), -W64LIT(0xaebd5b397ccdb5dc), -W64LIT(0x0a957a2b6a806c5c), -W64LIT(0x1f0be62f1c04ba41), -W64LIT(0x14dff456d4f5d8b8), -W64LIT(0x58819022615cfa1c), -W64LIT(0x05b03def3540362e), -W64LIT(0xe3a2571f6b1599dd), -W64LIT(0x9229b2c3f52728e1), -W64LIT(0xba62af6fa8386d64), -W64LIT(0x0673851926d32434), -W64LIT(0x641579d8e8b66721), -W64LIT(0x04f155bd9731388b), -W64LIT(0x9ecf4df1b9746089), -W64LIT(0x205cb723867d3566), -W64LIT(0x102ea1eb43c4e033), -W64LIT(0x3ba604b10d48b7ac), -W64LIT(0x50963aadba3e8aff), -W64LIT(0xac3f8b9dcd2fa963), -W64LIT(0x7b1e9ff7f4b2dd60), -W64LIT(0xf63ccb1b1d914fc0), -W64LIT(0x7eaea218c1f2eb4e), -W64LIT(0x5fb37d69e5fed08d), -W64LIT(0x56e5bfb49cedaecb), -W64LIT(0x2dfb2043685f73ab), -W64LIT(0x61a54437ddf6510f), -W64LIT(0x6fc16ba1204705d8), -W64LIT(0xe75302a2fc24a156), -W64LIT(0x3dd581a82b9b9398), -W64LIT(0xdbc7eb5875ce3c6b), -W64LIT(0x90ab626744c5345e), -W64LIT(0x59c0f870c32df4b9), -W64LIT(0x6697a97c59547b9e), -W64LIT(0xfde8d962d5602d39), -W64LIT(0xd3d041d7aeac4c88), -W64LIT(0x5ef2153b478fde28), -W64LIT(0xd4e2ac9c2a0e6619), -W64LIT(0x1e4a8e7dbe75b4e4), -W64LIT(0x72485d2a8da1a326), -W64LIT(0x437b23b0ea6978d6), -W64LIT(0x159e9c047684d61d), -W64LIT(0x0f2547c45fc05a72), -W64LIT(0xf10e265099336551), -W64LIT(0x3c94e9fa89ea9d3d), -W64LIT(0xbfd292809d785b4a), -W64LIT(0x0817aa8fdb6270e3), -W64LIT(0x60e42c657f875faa), -W64LIT(0x18390b6498a690d0), -W64LIT(0x478a760d7d58405d), -W64LIT(0x284b1dac5d1f4585), -W64LIT(0xb1b6bd1660c90f9d), -W64LIT(0xd15291731f4e5037), -W64LIT(0x4d1f0c2617d82c01), -W64LIT(0xc70fb5817a599430), -W64LIT(0x6d43bb0591a51967), -W64LIT(0x6e8003f382360b7d), -W64LIT(0x1d89368bade6a6fe), -W64LIT(0x4f9ddc82a63a30be), -W64LIT(0xedc6788996a4cd0a), -W64LIT(0xab0d66d6498d83f2), -W64LIT(0x54676f102d0fb274), -W64LIT(0xc17c30985c8ab004), -W64LIT(0x3865bc471edba5b6), -W64LIT(0x3924d415bcaaab13), -W64LIT(0x951b5f8871850270), -W64LIT(0x8a10b9a76d81b831), -W64LIT(0xbd5042242c9a47f5), -W64LIT(0xa5694940b43cd725), -W64LIT(0xff6a09c664823186), -W64LIT(0x8d2254ece92392a0), -W64LIT(0xb7c5380f461a2ba9), -W64LIT(0x82071328b6e3c8d2), -W64LIT(0xd721146a399d7403), -W64LIT(0xfada342951c207a8), -W64LIT(0x262f323aa0ae1152), -W64LIT(0xf04f4e023b426bf4), -W64LIT(0x276e5a6802df1ff7), -/* box 1 */ -W64LIT(0x3b4016dbfd16e203), -W64LIT(0x9a7574c51174530a), -W64LIT(0x90012e69c02ec8d3), -W64LIT(0xf44580e3d780e076), -W64LIT(0xf81dec2b49eca14b), -W64LIT(0x26cae3e8a6e3d7ef), -W64LIT(0x0962419e0c41f6ab), -W64LIT(0x54d1eb4070ebd951), -W64LIT(0x865e884b0188eec8), -W64LIT(0xdf76067ea406fe8a), -W64LIT(0x29849412e594fba0), -W64LIT(0x461569896869c0f2), -W64LIT(0xb5ddd6b3bbd6724e), -W64LIT(0x0c586cc89e6c413d), -W64LIT(0x6b0ad97054d904ea), -W64LIT(0xa135621eec62b109), -W64LIT(0x0eef7e47087ea461), -W64LIT(0xfaaafea4dffe4417), -W64LIT(0xe0ad344e80342331), -W64LIT(0xab4138b23d382ad0), -W64LIT(0x107390468e90fcff), -W64LIT(0xbe0885a2218561b9), -W64LIT(0xdbed22957d22c132), -W64LIT(0x2251c7037fc7e857), -W64LIT(0x33835ef8ba5e9c86), -W64LIT(0xb3f1e0d7f4e0a8aa), -W64LIT(0x3fdb32302432ddbb), -W64LIT(0xa719547aa3546bed), -W64LIT(0xe10c3df3cb3dab1f), -W64LIT(0x17feaf9f8aafae35), -W64LIT(0x9df84b1c154b01c0), -W64LIT(0x8364a51d93a5595e), -W64LIT(0x535cd49974d48b9b), -W64LIT(0x01a109bd4b09882e), -W64LIT(0xc4d0c529b0c51182), -W64LIT(0x2e09abcbe1aba96a), -W64LIT(0x1f3de7bccde7d0b0), -W64LIT(0x9317355b1d35a5a1), -W64LIT(0x6c87e6a950e65620), -W64LIT(0x8910ffb142ffc287), -W64LIT(0x40395fed275f1a16), -W64LIT(0x7b794936da49f815), -W64LIT(0xf269b68798b63a92), -W64LIT(0xfd27c17ddbc116dd), -W64LIT(0x8d8bdb5a9bdbfd3f), -W64LIT(0x1ba6c35714c3ef08), -W64LIT(0x6e30f426c6f4b37c), -W64LIT(0x7fe26ddd036dc7ad), -W64LIT(0x14e8b4ad57b4c347), -W64LIT(0xb985ba7b25ba3373), -W64LIT(0xe9cf75d08c75d59a), -W64LIT(0x626898ee5898f241), -W64LIT(0x5b9f9cba339cf51e), -W64LIT(0xb250e96abfe92084), -W64LIT(0x165fa622c1a6261b), -W64LIT(0xf5e4895e9c896858), -W64LIT(0xb76ac43c2dc49712), -W64LIT(0x02b7128f9612e55c), -W64LIT(0x1d8af5335bf535ec), -W64LIT(0x36b973ae28732b10), -W64LIT(0xa8572380e02347a2), -W64LIT(0xf6f2926c4192052a), -W64LIT(0x8c2ad2e7d0d27511), -W64LIT(0xd32e6ab63a6abfb7), -W64LIT(0xbd1e9e90fc9e0ccb), -W64LIT(0x03161b32dd1b6d72), -W64LIT(0x4dc03a98f23ad305), -W64LIT(0x81d3b79205b7bc02), -W64LIT(0x450372bbb572ad80), -W64LIT(0x2d1fb0f93cb0c418), -W64LIT(0x2a928f20388f96d2), -W64LIT(0x721b08a8d6080ebe), -W64LIT(0x92b63ce6563c2d8f), -W64LIT(0xeb78675f1a6730c6), -W64LIT(0x13658b74538b918d), -W64LIT(0x428e4d62b14dff4a), -W64LIT(0x88b1f60c09f64aa9), -W64LIT(0x75963771d2375c74), -W64LIT(0x7ad8408b9140703b), -W64LIT(0x57c7f072adf0b423), -W64LIT(0xe5971918121994a7), -W64LIT(0x5666f9cfe6f93c0d), -W64LIT(0x8f3cc9d50dc91863), -W64LIT(0x1e9cee0186ee589e), -W64LIT(0x8a06e4839fe4aff5), -W64LIT(0xb824b3c66eb3bb5d), -W64LIT(0xd1997839ac785aeb), -W64LIT(0x6752b5b8cab545d7), -W64LIT(0xb47cdf0ef0dffa60), -W64LIT(0x949a0a82190af76b), -W64LIT(0xc04be1c269e12e3a), -W64LIT(0xfc86c8c090c89ef3), -W64LIT(0xe3bb2f7c5d2f4e43), -W64LIT(0x6aabd0cd1fd08cc4), -W64LIT(0x2147dc31a2dc8525), -W64LIT(0xca3fbb6eb8bbb5e3), -W64LIT(0x48fa17ce60176493), -W64LIT(0x6444ae8a17ae28a5), -W64LIT(0x2b33869d73861efc), -W64LIT(0xd0387184e771d2c5), -W64LIT(0x7cf476efde76aadf), -W64LIT(0x63c9915313917a6f), -W64LIT(0xc929a05c65a0d891), -W64LIT(0xda4c2b28362b491c), -W64LIT(0xfe31da4f06da7baf), -W64LIT(0xc1eae87f22e8a614), -W64LIT(0x5c12a36337a3a7d4), -W64LIT(0x18b0d865c9d8827a), -W64LIT(0xe7200b97840b71fb), -W64LIT(0x4bec0cfcbd0c09e1), -W64LIT(0x0f4e77fa43772c4f), -W64LIT(0x4c613325b9335b2b), -W64LIT(0xf3c8bf3ad3bfb2bc), -W64LIT(0x87ff81f64a8166e6), -W64LIT(0xa38270917a705455), -W64LIT(0x1911d1d882d10a54), -W64LIT(0x44a27b06fe7b25ae), -W64LIT(0x049b24ebd9243fb8), -W64LIT(0xbb32a8f4b3a8d62f), -W64LIT(0x91a027d48b2740fd), -W64LIT(0x3d6c20bfb22038e7), -W64LIT(0xe681022acf02f9d5), -W64LIT(0xf17fadb545ad57e0), -W64LIT(0xcc138d0af78d6f07), -W64LIT(0x495b1e732b1eecbd), -W64LIT(0x38560de9200d8f71), -W64LIT(0xa9f62a3dab2acf8c), -W64LIT(0x47b46034236048dc), -W64LIT(0x8e9dc06846c0904d), -W64LIT(0xaccc076b3907781a), -W64LIT(0x32225745f15714a8), -W64LIT(0xd4a3556f3e55ed7d), -W64LIT(0xd7b54e5de34e800f), -W64LIT(0xddc114f132141bd6), -W64LIT(0x6d26ef141befde0e), -W64LIT(0x85489379dc9383ba), -W64LIT(0x0bd553119a5313f7), -W64LIT(0x786f520407529567), -W64LIT(0xcb9eb2d3f3b23dcd), -W64LIT(0xa223792c3179dc7b), -W64LIT(0x0a745aacd15a9bd9), -W64LIT(0x710d139a0b1363cc), -W64LIT(0x681cc24289c26998), -W64LIT(0x1a07caea5fca6726), -W64LIT(0x82c5aca0d8acd170), -W64LIT(0x25dcf8da7bf8ba9d), -W64LIT(0xc7c6de1b6dde7cf0), -W64LIT(0xc35dfaf0b4fa4348), -W64LIT(0xded70fc3ef0f76a4), -W64LIT(0x504acfaba9cfe6e9), -W64LIT(0xc571cc94fbcc99ac), -W64LIT(0x5ea5b1eca1b14288), -W64LIT(0xae7b15e4af159d46), -W64LIT(0xc888a9e12ea950bf), -W64LIT(0xf7539bd10a9b8d04), -W64LIT(0x962d180d8f181237), -W64LIT(0xe43610a559101c89), -W64LIT(0x772125fe4425b928), -W64LIT(0x84e99ac4979a0b94), -W64LIT(0xc667d7a626d7f4de), -W64LIT(0xefe343b4c3430f7e), -W64LIT(0xd5025cd2755c6553), -W64LIT(0xa6b85dc7e85de3c3), -W64LIT(0xd61447e0a8470821), -W64LIT(0x3e7a3b8d6f3b5595), -W64LIT(0x52fddd243fdd03b5), -W64LIT(0x8072be2f4ebe342c), -W64LIT(0x12c482c9188219a3), -W64LIT(0x9eee502ec8506cb2), -W64LIT(0xad6d0ed6720ef034), -W64LIT(0x59288e35a58e1042), -W64LIT(0xe21a26c11626c66d), -W64LIT(0x247df16730f132b3), -W64LIT(0xf0dea4080ea4dfce), -W64LIT(0x31344c772c4c79da), -W64LIT(0x4f77281764283659), -W64LIT(0x79ce5bb94c5b1d49), -W64LIT(0x0000000000000000), -W64LIT(0x73ba01159d018690), -W64LIT(0x74373ecc993ed45a), -W64LIT(0xbcbf972db79784e5), -W64LIT(0x4ed621aa2f21be77), -W64LIT(0xd95a301aeb30246e), -W64LIT(0x9c5942a15e4289ee), -W64LIT(0x37187a13637aa33e), -W64LIT(0x276bea55edea5fc1), -W64LIT(0x1c2bfc8e10fcbdc2), -W64LIT(0xed54513b5551ea22), -W64LIT(0x20e6d58ce9d50d0b), -W64LIT(0x3ae11f66b61f6a2d), -W64LIT(0x66f3bc0581bccdf9), -W64LIT(0x2cbeb94477b94c36), -W64LIT(0x99636ff7cc6f3e78), -W64LIT(0x953b033f52037f45), -W64LIT(0xb0e7fbe529fbc5d8), -W64LIT(0x60df8a61ce8a171d), -W64LIT(0x6f91fd9b8dfd3b52), -W64LIT(0xaae0310f7631a2fe), -W64LIT(0xbfa98c1f6a8ce997), -W64LIT(0x8ba7ed3ed4ed27db), -W64LIT(0x98c2664a8766b656), -W64LIT(0x062c36644f36dae4), -W64LIT(0x5570e2fd3be2517f), -W64LIT(0xead96ee2516eb8e8), -W64LIT(0x419856506c569238), -W64LIT(0x23f0cebe34ce6079), -W64LIT(0x309545ca6745f1f4), -W64LIT(0x5a3e950778957d30), -W64LIT(0x617e83dc85839f33), -W64LIT(0xfb0bf71994f7cc39), -W64LIT(0x3ccd2902f929b0c9), -W64LIT(0x70ac1a27401aebe2), -W64LIT(0xcea49f85619f8a5b), -W64LIT(0x39f704546b04075f), -W64LIT(0x0df96575d565c913), -W64LIT(0x08c3482347487e85), -W64LIT(0xd28f630b71633799), -W64LIT(0xecf558861e58620c), -W64LIT(0xc2fcf34dfff3cb66), -W64LIT(0x978c11b0c4119a19), -W64LIT(0x69bdcbffc2cbe1b6), -W64LIT(0xba93a149f8a15e01), -W64LIT(0x51ebc616e2c66ec7), -W64LIT(0x078d3fd9043f52ca), -W64LIT(0x58898788ee87986c), -W64LIT(0x4a4d0541f60581cf), -W64LIT(0xe86e7c6dc77c5db4), -W64LIT(0xee424a09884a8750), -W64LIT(0xcdb284b7bc84e729), -W64LIT(0x65e5a7375ca7a08b), -W64LIT(0x2fa8a276aaa22144), -W64LIT(0xa0946ba3a76b3927), -W64LIT(0xa5ae46f535468eb1), -W64LIT(0x35af689cf5684662), -W64LIT(0x28259dafae9d738e), -W64LIT(0xcf0596382a960275), -W64LIT(0xb6cbcd8166cd1f3c), -W64LIT(0x7e43646048644f83), -W64LIT(0x9bd47d785a7ddb24), -W64LIT(0x432f44dffa447764), -W64LIT(0x9f4f59938359e49c), -W64LIT(0x7d557f52957f22f1), -W64LIT(0x76802c430f2c3106), -W64LIT(0xdc601d4c791d93f8), -W64LIT(0x053a2d56922db796), -W64LIT(0x11d299fbc59974d1), -W64LIT(0xf9bce59602e52965), -W64LIT(0xd8fb39a7a039ac40), -W64LIT(0x340e6121be61ce4c), -W64LIT(0x5f04b851eab8caa6), -W64LIT(0x5db3aade7caa2ffa), -W64LIT(0x1549bd101cbd4b69), -W64LIT(0xff90d3f24dd3f381), -W64LIT(0xafda1c59e41c1568), -W64LIT(0xb146f25862f24df6), -W64LIT(0xa40f4f487e4f069f), -/* box 2 */ -W64LIT(0xa1a35cebf8f0f94c), -W64LIT(0x2c203d650f3f095d), -W64LIT(0x1a2bdaee4084a2a7), -W64LIT(0xd32404574d7bcc68), -W64LIT(0xf785bea594a9adc4), -W64LIT(0xf2eb54456206949c), -W64LIT(0x3f5e334d0475ced1), -W64LIT(0x5994299b835d1f60), -W64LIT(0x785b7989ac204794), -W64LIT(0x025da6a2cf461a41), -W64LIT(0xdf1f3a71f01a901b), -W64LIT(0x27284f018bb77637), -W64LIT(0xe1955a6d694c5310), -W64LIT(0x24a1baf2d9d261ac), -W64LIT(0xe4fbb08d9fe36a48), -W64LIT(0x8d83618ef7cff011), -W64LIT(0x2ac72276abf5279e), -W64LIT(0xf9e32621e68eebf6), -W64LIT(0xbf323fb4d3f86f69), -W64LIT(0xbb888605b8745beb), -W64LIT(0x70dafe1e7acd2f65), -W64LIT(0xd0adf1a41f1edbf3), -W64LIT(0x1e91635f2b089625), -W64LIT(0xee2791b8864818f8), -W64LIT(0x99ce23e4c56c1484), -W64LIT(0xf33f0714ff259946), -W64LIT(0xbd6f99161cbe7528), -W64LIT(0x9f293cf761a63a47), -W64LIT(0xb80173f6ea114c70), -W64LIT(0x6543ef25d54dc62a), -W64LIT(0x39b92c5ea0bfe012), -W64LIT(0x63a4f0367187e8e9), -W64LIT(0x4c0d38a02cddf62f), -W64LIT(0x07334c4239e92319), -W64LIT(0x43bff375c3d9bdc7), -W64LIT(0xca862b4a5f9a7954), -W64LIT(0x5d2e902ae8d12be2), -W64LIT(0x137e0e280b4ac78c), -W64LIT(0xf162a1b630638307), -W64LIT(0x55af17bd3e3c4313), -W64LIT(0x358212781ddebc61), -W64LIT(0x94214e93e52e452d), -W64LIT(0xc18e592edb12063e), -W64LIT(0xec7a371a490e02b9), -W64LIT(0x4963d240da72cf77), -W64LIT(0x41e255d70c9fa786), -W64LIT(0xff0439324244c535), -W64LIT(0x88ed8b6e0160c949), -W64LIT(0x6c163be39e83a301), -W64LIT(0xc534e09fb09e32bc), -W64LIT(0x806c0cf9d78da1b8), -W64LIT(0xdba583c09b96a499), -W64LIT(0x746047af11411be7), -W64LIT(0xf40c4b56c6ccba5f), -W64LIT(0x6270a367eca4e533), -W64LIT(0xd41748157492ef71), -W64LIT(0xeff3c2e91b6b1522), -W64LIT(0x0e66988472274632), -W64LIT(0x534808ae9af66dd0), -W64LIT(0x8231aa5b18cbbbf9), -W64LIT(0xb2dd52c3f3ba3ec0), -W64LIT(0xdd429cd33f5c8a5a), -W64LIT(0x4e509e02e39bec6e), -W64LIT(0x26fc1c5016947bed), -W64LIT(0xd9f8256254d0bed8), -W64LIT(0x0955d4c64bce652b), -W64LIT(0x1610e4c8fde5fed4), -W64LIT(0x6dc268b203a0aedb), -W64LIT(0x2e7d9bc7c079131c), -W64LIT(0xc3d3ff8c14541c7f), -W64LIT(0xd64aeeb7bbd4f530), -W64LIT(0xab7f7ddee15b8bfc), -W64LIT(0x144d426a32a3e495), -W64LIT(0x8e0a947da5aae78a), -W64LIT(0x798f2ad831034a4e), -W64LIT(0x3be48afc6ff9fa53), -W64LIT(0x529c5bff07d5600a), -W64LIT(0xbee66ce54edb62b3), -W64LIT(0x931202d1dcc76634), -W64LIT(0x50c1fd5dc8937a4b), -W64LIT(0xa4cdb60b0e5fc014), -W64LIT(0x57f2b11ff17a5952), -W64LIT(0x47054ac4a8558945), -W64LIT(0x5a1ddc68d13808fb), -W64LIT(0x5cfac37b75f22638), -W64LIT(0xc207acdd897711a5), -W64LIT(0x289a84d464b33ddf), -W64LIT(0xc05a0a7f46310be4), -W64LIT(0xe6a6162f50a57009), -W64LIT(0x06e71f13a4ca2ec3), -W64LIT(0x5f733688279731a3), -W64LIT(0xeb497b5870e721a0), -W64LIT(0xb667eb7298360a42), -W64LIT(0xe3c8fccfa60a4951), -W64LIT(0xe772457ecd867dd3), -W64LIT(0x6978d103682c9a59), -W64LIT(0x0def6d77204251a9), -W64LIT(0xc90fdeb90dff6ecf), -W64LIT(0xd179a2f5823dd629), -W64LIT(0x2fa9c8965d5a1ec6), -W64LIT(0x81b85fa84aaeac62), -W64LIT(0xdc96cf82a27f8780), -W64LIT(0x602d05c523e2ff72), -W64LIT(0x19a22f1d12e1b53c), -W64LIT(0xe52fe3dc02c06792), -W64LIT(0x58407aca1e7e12ba), -W64LIT(0x61f95694bec1f2a8), -W64LIT(0x48b781114751c2ad), -W64LIT(0xaaab2e8f7c788626), -W64LIT(0x04bab9b16b8c3482), -W64LIT(0x2df46e34921c0487), -W64LIT(0x1123a88ac40cddcd), -W64LIT(0xc6bd156ce2fb2527), -W64LIT(0x7f6835cb95c9648d), -W64LIT(0x83e5f90a85e8b623), -W64LIT(0x4f84cd537eb8e1b4), -W64LIT(0x294ed785f9903005), -W64LIT(0x1cccc5fde44e8c64), -W64LIT(0xcb52781bc2b9748e), -W64LIT(0x1d1896ac796d81be), -W64LIT(0xb30901926e99331a), -W64LIT(0xad9862cd4591a53f), -W64LIT(0xc8db8de890dc6315), -W64LIT(0x7bd28c7afe45500f), -W64LIT(0x0adc213519ab72b0), -W64LIT(0xa8f6882db33e9c67), -W64LIT(0xb5ee1e81ca531dd9), -W64LIT(0x201b0343b25e552e), -W64LIT(0x4036068691bcaa5c), -W64LIT(0xae11973e17f4b2a4), -W64LIT(0x9efd6fa6fc85379d), -W64LIT(0x33650d6bb91492a2), -W64LIT(0x3a30d9adf2daf789), -W64LIT(0x0c3b3e26bd615c73), -W64LIT(0xf651edf4098aa01e), -W64LIT(0x710ead4fe7ee22bf), -W64LIT(0x3138abc9765288e3), -W64LIT(0x9d749a55aee02006), -W64LIT(0x6e4b9d4151c5b940), -W64LIT(0x84d6b548bc01953a), -W64LIT(0x360be78b4fbbabfa), -W64LIT(0xa22aa918aa95eed7), -W64LIT(0xedae644bd42d0f63), -W64LIT(0x46d119953576849f), -W64LIT(0x6497bc74486ecbf0), -W64LIT(0xfbbe808329c8f1b7), -W64LIT(0x4aea27b38817d8ec), -W64LIT(0x5626e24e6c595488), -W64LIT(0x056eeae0f6af3958), -W64LIT(0x4558ec6667139304), -W64LIT(0x448cbf37fa309ede), -W64LIT(0x6f9fce10cce6b49a), -W64LIT(0xa0770fba65d3f496), -W64LIT(0x671e49871a0bdc6b), -W64LIT(0xda71d09106b5a943), -W64LIT(0x08818797d6ed68f1), -W64LIT(0xa3fefa4937b6e30d), -W64LIT(0xb080f4613cfc2481), -W64LIT(0x763de10dde0701a6), -W64LIT(0x4dd96bf1b1fefbf5), -W64LIT(0x92c6518041e46bee), -W64LIT(0x3456412980fdb1bb), -W64LIT(0x981a70b5584f195e), -W64LIT(0x3d0395efcb33d490), -W64LIT(0xba5cd55425575631), -W64LIT(0x4b3e74e21534d536), -W64LIT(0x6af124f03a498dc2), -W64LIT(0x7ebc669a08ea6957), -W64LIT(0x30ecf898eb718539), -W64LIT(0xa922db7c2e1d91bd), -W64LIT(0x7a06df2b63665dd5), -W64LIT(0xb154a730a1df295b), -W64LIT(0xfc8dccc11021d2ae), -W64LIT(0xcfe8c1aaa935400c), -W64LIT(0x97a8bb60b74b52b6), -W64LIT(0x18767c4c8fc2b8e6), -W64LIT(0x9a47d6179709031f), -W64LIT(0x0000000000000000), -W64LIT(0xac4c319cd8b2a8e5), -W64LIT(0xb9d520a7773241aa), -W64LIT(0xdecb69206d399dc1), -W64LIT(0x1f45300eb62b9bff), -W64LIT(0x10f7fbdb592fd017), -W64LIT(0x3e8a601c9956c30b), -W64LIT(0x8502e619212298e0), -W64LIT(0xf5d818075befb785), -W64LIT(0x547b44eca31f4ec9), -W64LIT(0x9ca0c90433c32ddc), -W64LIT(0xe041093cf46f5eca), -W64LIT(0xa69010a9c119da55), -W64LIT(0xc769463d7fd828fd), -W64LIT(0xc4e0b3ce2dbd3f66), -W64LIT(0x2575e9a344f16c76), -W64LIT(0x01d453519d230dda), -W64LIT(0xfa6ad3d2b4ebfc6d), -W64LIT(0xd5c31b44e9b1e2ab), -W64LIT(0xf83775707bade62c), -W64LIT(0xbcbbca47819d78f2), -W64LIT(0xd79ebde626f7f8ea), -W64LIT(0x5bc98f394c1b0521), -W64LIT(0x2246a5e17d184f6f), -W64LIT(0x12aa5d799669ca56), -W64LIT(0x5ea765d9bab43c79), -W64LIT(0x8939d83f9c43c493), -W64LIT(0x32b15e3a24379f78), -W64LIT(0xe914ddfabfa13be1), -W64LIT(0x909bf7228ea271af), -W64LIT(0x73530bed28a838fe), -W64LIT(0xd2f05706d058c1b2), -W64LIT(0xfed06a63df67c8ef), -W64LIT(0xb43a4dd057701003), -W64LIT(0xa519e55a937ccdce), -W64LIT(0x75b414fe8c62163d), -W64LIT(0xafc5c46f8ad7bf7e), -W64LIT(0x2392f6b0e03b42b5), -W64LIT(0x386d7f0f3d9cedc8), -W64LIT(0x21cf50122f7d58f4), -W64LIT(0x9b9385460a2a0ec5), -W64LIT(0x5115ae0c55b07791), -W64LIT(0x0fb2cbd5ef044be8), -W64LIT(0xea9d2809edc42c7a), -W64LIT(0xcc613459fb505797), -W64LIT(0x426ba0245efab01d), -W64LIT(0x1599113baf80e94f), -W64LIT(0x7d3593695a8f7ecc), -W64LIT(0x0389f5f35265179b), -W64LIT(0x875f40bbee6482a1), -W64LIT(0x95f51dc2780d48f7), -W64LIT(0x7ce1c038c7ac7316), -W64LIT(0xce3c92fb34164dd6), -W64LIT(0xcdb5670866735a4d), -W64LIT(0x8ab02dccce26d308), -W64LIT(0x914fa47313817c75), -W64LIT(0x8b647e9d5305ded2), -W64LIT(0xd82c7633c9f3b302), -W64LIT(0x728758bcb58b3524), -W64LIT(0xe8c08eab2282363b), -W64LIT(0x8fdec72c3889ea50), -W64LIT(0x2b13712736d62a44), -W64LIT(0x3cd7c6be5610d94a), -W64LIT(0x37dfb4dad298a620), -W64LIT(0x868b13ea73478f7b), -W64LIT(0xb7b3b82305150798), -W64LIT(0x0b08726484887f6a), -W64LIT(0x1bff89bfdda7af7d), -W64LIT(0x77e9b25c43240c7c), -W64LIT(0xf0b6f2e7ad408edd), -W64LIT(0x17c4b79960c6f30e), -W64LIT(0x8c5732df6aecfdcb), -W64LIT(0x68ac8252f50f9783), -W64LIT(0x66ca1ad68728d1b1), -W64LIT(0x6b2577a1a76a8018), -W64LIT(0xe21caf9e3b29448b), -W64LIT(0xa74443f85c3ad78f), -W64LIT(0xfd599f908d02df74), -W64LIT(0x967ce8312a685f6c), -/* box 3 */ -W64LIT(0xfa7b9775ba3af751), -W64LIT(0x03ef98cb769c2d13), -W64LIT(0x7191ce067072359e), -W64LIT(0xbab18b6bff7516a8), -W64LIT(0xe6e5ef4efbc1065e), -W64LIT(0x7bec74a3b1d0dbf4), -W64LIT(0x656b4fb907c31c4a), -W64LIT(0x4e8520f99fc86304), -W64LIT(0x8fd8df31d16dae58), -W64LIT(0x90a93fc1e60a7244), -W64LIT(0x30ad09f2b449cfc5), -W64LIT(0x8453be7e91bb5b90), -W64LIT(0x1d68a3d1c08feaad), -W64LIT(0x5c54642504b410f6), -W64LIT(0x8061383c8a9e3707), -W64LIT(0xf9940fbecca6da42), -W64LIT(0x46e1d97da982bbdf), -W64LIT(0xfc50521656f7ad77), -W64LIT(0x5e4d2704f35c2647), -W64LIT(0x8bea5973ca48c2cf), -W64LIT(0xd06323dfa34593bd), -W64LIT(0x62b651306a7a5dce), -W64LIT(0xa436b0714966d116), -W64LIT(0x4f73fb131ebc78a6), -W64LIT(0x92b07ce011e244f5), -W64LIT(0x33429139c2d5e2d6), -W64LIT(0xcee418c515565403), -W64LIT(0xd7be3d56cefcd239), -W64LIT(0x53ed83285f4789a9), -W64LIT(0xf3e9b51b0d043428), -W64LIT(0x20650e0fd8dd8a86), -W64LIT(0xb6e7f4add21aa2e4), -W64LIT(0x6d0fb63d3189c491), -W64LIT(0x0da0a42cac1bafee), -W64LIT(0x3f14eeffefba569a), -W64LIT(0x13279f361a086850), -W64LIT(0x9b225e8ea6dc878c), -W64LIT(0x6684d772715f3159), -W64LIT(0xa3ebaef824df9092), -W64LIT(0xc499a260d4f4ba69), -W64LIT(0xaa798c9693e153eb), -W64LIT(0x50021be329dba4ba), -W64LIT(0x949bb983fd2f1ed3), -W64LIT(0xdfdac4d2f8b60ae2), -W64LIT(0xf0062dd07b98193b), -W64LIT(0xafbdd13e09b024de), -W64LIT(0xb95e13a089e93bbb), -W64LIT(0x649d945386b707e8), -W64LIT(0xe4fcac6f0c2930ef), -W64LIT(0x413cc7f4c43bfa5b), -W64LIT(0x3b2668bdf49f3a0d), -W64LIT(0xe50a77858d5d2b4d), -W64LIT(0x05c45da89a517735), -W64LIT(0x3ee235156ece4d38), -W64LIT(0xfe491137a11f9bc6), -W64LIT(0xb7112f47536eb946), -W64LIT(0x07dd1e896db94184), -W64LIT(0x1ab5bd58ad36ab29), -W64LIT(0x8197e3d60bea2ca5), -W64LIT(0xab8f577c12954849), -W64LIT(0x9cff4007cb65c608), -W64LIT(0xa00436335243bd81), -W64LIT(0xfda689fcd783b6d5), -W64LIT(0xccfd5be4e2be62b2), -W64LIT(0x75a348446b575909), -W64LIT(0x17151974012d04c7), -W64LIT(0xfb8d4c9f3b4eecf3), -W64LIT(0xac5249f57f2c09cd), -W64LIT(0x9346a70a90965f57), -W64LIT(0x043286421b256c97), -W64LIT(0x27b81086b564cb02), -W64LIT(0x3569545a2e18b8f0), -W64LIT(0x6b24735edd449eb7), -W64LIT(0x2193d5e559a99124), -W64LIT(0xc7763aaba268977a), -W64LIT(0xb0cc31ce3ed7f8c2), -W64LIT(0xc939064c78ef1587), -W64LIT(0x16e3c29e80591f65), -W64LIT(0x5da2bfcf85c00b54), -W64LIT(0x5990398d9ee567c3), -W64LIT(0x67720c98f02b2afb), -W64LIT(0x54309da132fec82d), -W64LIT(0xeab39088d6aeb212), -W64LIT(0x9682faa20ac72862), -W64LIT(0xd38cbb14d5d9beae), -W64LIT(0x4c9c63d8682055b5), -W64LIT(0xd648e6bc4f88c99b), -W64LIT(0xdc355c198e2a27f1), -W64LIT(0x10c807fd6c944543), -W64LIT(0x450e41b6df1e96cc), -W64LIT(0x0b8b614f40d6f5c8), -W64LIT(0xd27a60fe54ada50c), -W64LIT(0x49583e70f2712280), -W64LIT(0x8dc19c10268598e9), -W64LIT(0x5866e2671f917c61), -W64LIT(0x79f537824638ed45), -W64LIT(0xc2b267033839e04f), -W64LIT(0xcb20456d8f072336), -W64LIT(0x2a18b4aa197f64ec), -W64LIT(0xdbe84290e3936675), -W64LIT(0x73888d27879a032f), -W64LIT(0xe8aad3a9214684a3), -W64LIT(0x6ee02ef64715e982), -W64LIT(0xa996145de57d7ef8), -W64LIT(0xc8cfdda6f99b0e25), -W64LIT(0x062bc563eccd5a26), -W64LIT(0x264ecb6c3410d0a0), -W64LIT(0xb8a8c84a089d2019), -W64LIT(0x7dc7b1c05d1d81d2), -W64LIT(0xd5a77e773914e488), -W64LIT(0x4b417d5105991431), -W64LIT(0xf62de8b39755431d), -W64LIT(0x993b1daf5134b13d), -W64LIT(0x82787b1d7d7601b6), -W64LIT(0xe321b2e66190716b), -W64LIT(0xb5086c66a4868ff7), -W64LIT(0x9ee603263c8df0b9), -W64LIT(0x349f8fb0af6ca352), -W64LIT(0x5b897aac690d5172), -W64LIT(0x7c316a2adc699a70), -W64LIT(0xd451a59db860ff2a), -W64LIT(0x706715ecf1062e3c), -W64LIT(0x838ea0f7fc021a14), -W64LIT(0x57df056a4462e53e), -W64LIT(0xcf12c32f94224fa1), -W64LIT(0xed6e8e01bb17f396), -W64LIT(0x915fe42b677e69e6), -W64LIT(0x89f31a523da0f47e), -W64LIT(0xe71334a47ab51dfc), -W64LIT(0xa860cfb76409655a), -W64LIT(0x9f10d8ccbdf9eb1b), -W64LIT(0xef77cd204cffc527), -W64LIT(0xf862d4544dd2c1e0), -W64LIT(0x8a1c82994b3cd96d), -W64LIT(0xae4b0ad488c43f7c), -W64LIT(0x98cdc645d040aa9f), -W64LIT(0x7fdef2e1aaf5b763), -W64LIT(0x4717029728f6a07d), -W64LIT(0x745593aeea2342ab), -W64LIT(0xee8116cacd8bde85), -W64LIT(0x727e56cd06ee188d), -W64LIT(0x227c4d2e2f35bc37), -W64LIT(0x977421488bb333c0), -W64LIT(0xa21d7512a5ab8b30), -W64LIT(0xbb4750817e010d0a), -W64LIT(0x6cf96dd7b0fddf33), -W64LIT(0x2801f78bee97525d), -W64LIT(0x1c9e783b41fbf10f), -W64LIT(0x9d099bed4a11ddaa), -W64LIT(0x7a1aaf4930a4c056), -W64LIT(0x32b44ad343a1f974), -W64LIT(0x3cfb763499267b89), -W64LIT(0xb2d572efc93fce73), -W64LIT(0x63408adaeb0e466c), -W64LIT(0xada4921ffe58126f), -W64LIT(0x5fbbfcee72283de5), -W64LIT(0x6ad2a8b45c308515), -W64LIT(0x0c567fc62d6fb44c), -W64LIT(0x956d62697c5b0571), -W64LIT(0x25a153a7428cfdb3), -W64LIT(0x150c5a55f6c53276), -W64LIT(0xe2d7690ce0e46ac9), -W64LIT(0xda1e997a62e77dd7), -W64LIT(0xf5c27078e1c96e0e), -W64LIT(0xc344bce9b94dfbed), -W64LIT(0x60af12119d926b7f), -W64LIT(0xa1f2edd9d337a623), -W64LIT(0xcad69e870e733894), -W64LIT(0x3770177bd9f08e41), -W64LIT(0xa5c06b9bc812cab4), -W64LIT(0x1f71e0f03767dc1c), -W64LIT(0x44f89a5c5e6a8d6e), -W64LIT(0x6159c9fb1ce670dd), -W64LIT(0x8e2e04db5019b5fa), -W64LIT(0x8805c1b8bcd4efdc), -W64LIT(0xe138f1c7967847da), -W64LIT(0x4ab7a6bb84ed0f93), -W64LIT(0x0000000000000000), -W64LIT(0x38c9f0768203171e), -W64LIT(0x1b4366b22c42b08b), -W64LIT(0x7803ec68c74cf6e7), -W64LIT(0xec9855eb3a63e834), -W64LIT(0xbe830d29e4507a3f), -W64LIT(0x2dc5aa2374c62568), -W64LIT(0xa62ff350be8ee7a7), -W64LIT(0x764cd08f1dcb741a), -W64LIT(0x8c3747faa7f1834b), -W64LIT(0x0fb9e70d5bf3995f), -W64LIT(0x55c6464bb38ad38f), -W64LIT(0xf7db3359162158bf), -W64LIT(0xd195f8352231881f), -W64LIT(0x0992226eb73ec379), -W64LIT(0x14fa81bf77b129d4), -W64LIT(0x48aee59a73053922), -W64LIT(0x2457884dc3f8e611), -W64LIT(0xffbfcadd206b8064), -W64LIT(0xb4feb78c25f29455), -W64LIT(0x864afd5f66536d21), -W64LIT(0x6f16f51cc661f220), -W64LIT(0xde2c1f3879c21140), -W64LIT(0x195a2593dbaa863a), -W64LIT(0x2e2a32e8025a087b), -W64LIT(0x432584d533d3ccea), -W64LIT(0x2c3371c9f5b23eca), -W64LIT(0xa7d928ba3ffafc05), -W64LIT(0x42d35f3fb2a7d748), -W64LIT(0x85a5659410cf4032), -W64LIT(0x0864f984364ad8db), -W64LIT(0xf21f6ef18c702f8a), -W64LIT(0xf1f0f63afaec0299), -W64LIT(0xd9f101b1147b50c4), -W64LIT(0x2fdce902832e13d9), -W64LIT(0x4d6ab832e9544e17), -W64LIT(0xe0ce2a2d170c5c78), -W64LIT(0x51f4c009a8afbf18), -W64LIT(0x68cbeb95abd8b3a4), -W64LIT(0xc15dffc84ea5cd5c), -W64LIT(0x02194321f7e836b1), -W64LIT(0x113edc17ede05ee1), -W64LIT(0x521b58c2de33920b), -W64LIT(0x9ad4856427a89c2e), -W64LIT(0x5629de80c516fe9c), -W64LIT(0x77ba0b659cbf6fb8), -W64LIT(0x238a96c4ae41a795), -W64LIT(0x12d144dc9b7c73f2), -W64LIT(0xd807da5b950f4b66), -W64LIT(0x3686cc91588495e3), -W64LIT(0x18acfe795ade9d98), -W64LIT(0x5a7fa146e8794ad0), -W64LIT(0xc680e141231c8cd8), -W64LIT(0x1e873b1ab613c7be), -W64LIT(0xf434ab9260bd75ac), -W64LIT(0xcd0b800e63ca7910), -W64LIT(0xbc9a4e0813b84c8e), -W64LIT(0x3d0dadde1852602b), -W64LIT(0x40ca1c1e454fe1f9), -W64LIT(0x0a7dbaa5c1a2ee6a), -W64LIT(0x693d307f2aaca806), -W64LIT(0x0e4f3ce7da8782fd), -W64LIT(0xbd6c95e292cc572c), -W64LIT(0x3ad0b35775eb21af), -W64LIT(0x7e28290b2b81acc1), -W64LIT(0x01f6dbea81741ba2), -W64LIT(0x87bc26b5e7277683), -W64LIT(0x393f2b9c03770cbc), -W64LIT(0xddc387f30f5e3c53), -W64LIT(0xeb454b6257daa9b0), -W64LIT(0xb323a905484bd5d1), -W64LIT(0xb13aea24bfa3e360), -W64LIT(0x315bd218353dd467), -W64LIT(0x2bee6f40980b7f4e), -W64LIT(0xe95c0843a0329f01), -W64LIT(0xc56f798a5580a1cb), -W64LIT(0xbf75d6c36524619d), -W64LIT(0x29f72c616fe349ff), -W64LIT(0xc0ab2422cfd1d6fe), -/* box 4 */ -W64LIT(0x561fc423e957943c), -W64LIT(0x014287ca69079288), -W64LIT(0x2f086129dfcd1d21), -W64LIT(0xc537d4aea044fd99), -W64LIT(0xf1e8c3bfd7c8a457), -W64LIT(0x2971998a5cdf9bfb), -W64LIT(0x23fa649a2ce9e460), -W64LIT(0x3aa9e9c356a6716a), -W64LIT(0xd6efa4e7aa3d1708), -W64LIT(0x705a24b1fda5b5eb), -W64LIT(0x101e0ce2b170a9fc), -W64LIT(0x7ca821020e814caa), -W64LIT(0x0bc97ada1931ed13), -W64LIT(0x34df1711778c59ce), -W64LIT(0xd35020ef9226d2bf), -W64LIT(0x575d43e9805006b4), -W64LIT(0x91acebec9b1db840), -W64LIT(0x549b3f423b5945d9), -W64LIT(0x99a3ed9d3925163e), -W64LIT(0x7917a50a369a891d), -W64LIT(0xe372343cb4b6dc4e), -W64LIT(0x8d40e2bdd949e8fd), -W64LIT(0xcfbc29bed0728202), -W64LIT(0x969794857108ac12), -W64LIT(0xdd26de3db30cfa1b), -W64LIT(0x115c8b28d8773b74), -W64LIT(0xe9f9c92cc480a3d5), -W64LIT(0x4dc8b21b4116d0d3), -W64LIT(0x316093194f979c79), -W64LIT(0x5124bb4a0342806e), -W64LIT(0xb31408bcdef3cea8), -W64LIT(0xc1cad76cf158aaa6), -W64LIT(0x88ff66b5e1522d4a), -W64LIT(0xa8c37e8476b28a47), -W64LIT(0x15a188ea896b6c4b), -W64LIT(0xa24883940684f5dc), -W64LIT(0xda1da1545919ee49), -W64LIT(0x22b8e35045ee76e8), -W64LIT(0x6106af9925d28e9f), -W64LIT(0xef80318f4792250f), -W64LIT(0x663dd0f0cfc79acd), -W64LIT(0x302214d326900ef1), -W64LIT(0xdfa2255c61022bfe), -W64LIT(0xe6cdb0348cad19f9), -W64LIT(0x50663c806a4512e6), -W64LIT(0x65fbac5b74ced9a0), -W64LIT(0xc4755364c9436f11), -W64LIT(0x8fc419dc0b473918), -W64LIT(0x5c9439339961eba7), -W64LIT(0x3f166dcb6ebdb4dd), -W64LIT(0xba59890715ccf25e), -W64LIT(0xf0aa4475becf36df), -W64LIT(0x03c67cabbb09436d), -W64LIT(0xb99ff5acaec5b133), -W64LIT(0xf9e7c5ce75f00a29), -W64LIT(0x6df4aa2ad6f677de), -W64LIT(0xaeba8627f5a00c9d), -W64LIT(0xa573fcfdec91e18e), -W64LIT(0x7f6e5da9b5880fc7), -W64LIT(0xca03adb6e86947b5), -W64LIT(0x74a72773acb9e2d4), -W64LIT(0x604428534cd51c17), -W64LIT(0xf8a542041cf798a1), -W64LIT(0x448533a08a29ec25), -W64LIT(0x80f060c4436a8334), -W64LIT(0x0db082799a236bc9), -W64LIT(0xfa21b965cef94944), -W64LIT(0x64b92b911dc94b28), -W64LIT(0x7118a37b94a22763), -W64LIT(0xaff801ed9ca79e15), -W64LIT(0x1dae8e9b2b53c235), -W64LIT(0x13d870490a79ea91), -W64LIT(0x8a7b9dd4335cfcaf), -W64LIT(0x1f2a75faf95d13d0), -W64LIT(0xeec2b6452e95b787), -W64LIT(0xc34e2c0d23567b43), -W64LIT(0x47434f0b3120af48), -W64LIT(0xa18eff3fbd8db6b1), -W64LIT(0x98e16a57502284b6), -W64LIT(0x37196bbacc851aa3), -W64LIT(0x8e869e166240ab90), -W64LIT(0x9fda153eba3790e4), -W64LIT(0xf515c07d86d4f368), -W64LIT(0x72dedfd02fab640e), -W64LIT(0xe230b3f6ddb14ec6), -W64LIT(0x97d5134f180f3e9a), -W64LIT(0xe1f6cf5d66b80dab), -W64LIT(0xe78f37fee5aa8b71), -W64LIT(0xa30a045e6f836754), -W64LIT(0x90ee6c26f21a2ac8), -W64LIT(0xaa4785e5a4bc5ba2), -W64LIT(0x4e0eceb0fa1f93be), -W64LIT(0x94136fe4a3067df7), -W64LIT(0x7b935e6be49458f8), -W64LIT(0x9b2716fceb2bc7db), -W64LIT(0x840d63061276d40b), -W64LIT(0xed04caee959cf4ea), -W64LIT(0xea3fb5877f89e0b8), -W64LIT(0xb56df01f5de14872), -W64LIT(0x4935b1d9100a87ec), -W64LIT(0x82749ba5916452d1), -W64LIT(0x58693af1c87dbc98), -W64LIT(0x89bde17f8855bfc2), -W64LIT(0x677f573aa6c00845), -W64LIT(0xeb7d324d168e7230), -W64LIT(0x0284fb61d20ed1e5), -W64LIT(0xb190f3dd0cfd1f4d), -W64LIT(0x684b2e22eeedb269), -W64LIT(0x2bf562eb8ed14a1e), -W64LIT(0xe0b448970fbf9f23), -W64LIT(0x396f9568edaf3207), -W64LIT(0x52e2c7e1b84bc303), -W64LIT(0x77615bd817b0a1b9), -W64LIT(0x7e2cda63dc8f9d4f), -W64LIT(0xf22ebf146cc1e73a), -W64LIT(0xc08850a6985f382e), -W64LIT(0xd9dbddffe210ad24), -W64LIT(0xbfe60d0f2dd737e9), -W64LIT(0x9a659136822c5553), -W64LIT(0x87cb1fada97f9766), -W64LIT(0x4c8a35d12811425b), -W64LIT(0x83361c6ff863c059), -W64LIT(0xd212a725fb214037), -W64LIT(0x9e9892f4d330026c), -W64LIT(0x45c7b46ae32e7ead), -W64LIT(0x5baf465a7374fff5), -W64LIT(0xdc6459f7da0b6893), -W64LIT(0xd46b5f867833c6ed), -W64LIT(0x5dd6bef9f066792f), -W64LIT(0xcb412a7c816ed53d), -W64LIT(0x75e5a0b9c5be705c), -W64LIT(0xf6d3bcd63dddb005), -W64LIT(0xfb633eafa7fedbcc), -W64LIT(0xd529d84c11345465), -W64LIT(0xc9c5d11d536004d8), -W64LIT(0xdb5f269e301e7cc1), -W64LIT(0x86899867c07805ee), -W64LIT(0x3d9296aabcb36538), -W64LIT(0x2cce1d8264c45e4c), -W64LIT(0x5aedc1901a736d7d), -W64LIT(0x2e4ae6e3b6ca8fa9), -W64LIT(0x1e68f230905a8158), -W64LIT(0xdee0a2960805b976), -W64LIT(0xcd38d2df027c53e7), -W64LIT(0x6909a9e887ea20e1), -W64LIT(0x24c11bf3c6fcf032), -W64LIT(0x18110a9313480782), -W64LIT(0xa7f7079c3e9f306b), -W64LIT(0xd8995a358b173fac), -W64LIT(0x854fe4cc7b714683), -W64LIT(0xbd62f66effd9e60c), -W64LIT(0x14e30f20e06cfec3), -W64LIT(0x6e32d6816dff34b3), -W64LIT(0x217e9ffbfee73585), -W64LIT(0xc88756d73a679650), -W64LIT(0x359d90db1e8bcb46), -W64LIT(0x2645e09214f221d7), -W64LIT(0x04fd03c2511c573f), -W64LIT(0x739c581a46acf686), -W64LIT(0xb0d2741765fa8dc5), -W64LIT(0xa0cc78f5d48a2439), -W64LIT(0x5e10c2524b6f3a42), -W64LIT(0xe50bcc9f37a45a94), -W64LIT(0x53a0402bd14c518b), -W64LIT(0x413ab7a8b2322992), -W64LIT(0x203c183197e0a70d), -W64LIT(0xcc7a55156b7bc16f), -W64LIT(0x4601c8c158273dc0), -W64LIT(0xbea48ac544d0a561), -W64LIT(0x638254f8f7dc5f7a), -W64LIT(0xa6b580565798a2e3), -W64LIT(0x3cd01160d5b4f7b0), -W64LIT(0x8c026577b04e7a75), -W64LIT(0x7ad1d9a18d93ca70), -W64LIT(0x785522c05f9d1b95), -W64LIT(0x5f5245982268a8ca), -W64LIT(0x9551e82eca01ef7f), -W64LIT(0x0000000000000000), -W64LIT(0xbb1b0ecd7ccb60d6), -W64LIT(0x094d81bbcb3f3cf6), -W64LIT(0x28331e4035d80973), -W64LIT(0xf7913b1c54da228d), -W64LIT(0x6acfd5433ce3638c), -W64LIT(0x1bd77638a84144ef), -W64LIT(0x62c0d3329edbcdf2), -W64LIT(0x81b2e70e2a6d11bc), -W64LIT(0xd7ad232dc33a8580), -W64LIT(0x05bf8408381bc5b7), -W64LIT(0x33e468789d994d9c), -W64LIT(0xfedcbaa79fe51e7b), -W64LIT(0x4f4c497a93180136), -W64LIT(0x073b7f69ea151452), -W64LIT(0x0cf205b3f324f941), -W64LIT(0x382d12a284a8a08f), -W64LIT(0x1cec0951425450bd), -W64LIT(0x55d9b888525ed751), -W64LIT(0x6cb62de0bff1e556), -W64LIT(0xd1d4db8e4028035a), -W64LIT(0x25839c39affb62ba), -W64LIT(0x4af3cd72ab03c481), -W64LIT(0xa4317b3785967306), -W64LIT(0x1a95f1f2c146d667), -W64LIT(0x926a97472014fb2d), -W64LIT(0xb7e90b7e8fef9997), -W64LIT(0xcefeae74b975108a), -W64LIT(0x3e54ea0107ba2655), -W64LIT(0xd0965c44292f91d2), -W64LIT(0xab05022fcdbbc92a), -W64LIT(0xfd1ac60c24ec5d16), -W64LIT(0xfc5841c64debcf9e), -W64LIT(0xe4494b555ea3c81c), -W64LIT(0xb6ab8cb4e6e80b1f), -W64LIT(0x3beb6e093fa1e3e2), -W64LIT(0xf36c38de05c675b2), -W64LIT(0x9c1c6995013ed389), -W64LIT(0x8b391a1e5a5b6e27), -W64LIT(0xec464d24fc9b6662), -W64LIT(0xad7cfa8c4ea94ff0), -W64LIT(0x0f347918482dba2c), -W64LIT(0x9d5eee5f68394101), -W64LIT(0x7623dc127eb73331), -W64LIT(0x32a6efb2f49edf14), -W64LIT(0x2d8c9a480dc3ccc4), -W64LIT(0xb2568f76b7f45c20), -W64LIT(0x0e76fed2212a28a4), -W64LIT(0x48773613790d1564), -W64LIT(0x129af783637e7819), -W64LIT(0x080f0671a238ae7e), -W64LIT(0x365bec70a582882b), -W64LIT(0x42fccb03093b6aff), -W64LIT(0x0a8bfd1070367f9b), -W64LIT(0xff9e3d6df6e28cf3), -W64LIT(0xe8bb4ee6ad87315d), -W64LIT(0xc7b32fcf724a2c7c), -W64LIT(0xb8dd7266c7c223bb), -W64LIT(0x9328108d491369a5), -W64LIT(0x0679f8a3831286da), -W64LIT(0x270767587df5b35f), -W64LIT(0xa981f94e1fb518cf), -W64LIT(0x6b8d528955e4f104), -W64LIT(0x1667f44132622f26), -W64LIT(0x2ab7e521e7d6d896), -W64LIT(0xac3e7d4627aedd78), -W64LIT(0x7deaa6c86786de22), -W64LIT(0x1725738b5b65bdae), -W64LIT(0x4bb14ab8c2045609), -W64LIT(0x592bbd3ba17a2e10), -W64LIT(0xc20cabc74a51e9cb), -W64LIT(0x6f70514b04f8a63b), -W64LIT(0xbc2071a496de7484), -W64LIT(0x19538d597a4f950a), -W64LIT(0xf45747b7efd361e0), -W64LIT(0x43be4cc9603cf877), -W64LIT(0xc6f1a8051b4dbef4), -W64LIT(0xb42f77d534e6dafa), -W64LIT(0x40783062db35bb1a), -/* box 5 */ -W64LIT(0xf5a96c292deb0a4e), -W64LIT(0x211c9df6ee653c51), -W64LIT(0x04de5ddcbeeef596), -W64LIT(0xe1e5b06f7457c19f), -W64LIT(0x74ca30f014a54fb6), -W64LIT(0xc296f9f7c5457d85), -W64LIT(0x7d4ee08a484d10b0), -W64LIT(0xae87f2d0bf9b13ad), -W64LIT(0x8df4bb480e89afb7), -W64LIT(0x2d8b7a67d9a2d61e), -W64LIT(0x0f3559c8bd712adb), -W64LIT(0x541bc7312f013338), -W64LIT(0x9ec4848b636d5164), -W64LIT(0x952f809f60f28e29), -W64LIT(0x28984d8cb28d6357), -W64LIT(0xd4b5f1dfc38e361f), -W64LIT(0x5674135f7076b373), -W64LIT(0xb791a330042172ec), -W64LIT(0xab94c53bd4b4a6e4), -W64LIT(0xf17731f59305ffd8), -W64LIT(0x39c7a621801e1dcf), -W64LIT(0x20d1f7c13ba47c8e), -W64LIT(0x5e3da912f95facaa), -W64LIT(0xb1202a82e5b80731), -W64LIT(0x13303fc36de4fed3), -W64LIT(0x2e29c43e5314168a), -W64LIT(0x861fbf5c0d1670fa), -W64LIT(0x6458b16af3f771f1), -W64LIT(0x3043765bdcf642c9), -W64LIT(0x12fd55f4b825be0c), -W64LIT(0x0a266e23d65e9f92), -W64LIT(0x6595db5d2636312e), -W64LIT(0x85bd010587a0b06e), -W64LIT(0x9bd7b3600842e42d), -W64LIT(0xaa59af0c0175e63b), -W64LIT(0x240faa1d854a8918), -W64LIT(0xf464061ef82a4a91), -W64LIT(0x5c527d7ca6282ce1), -W64LIT(0x03a2be598ab6c094), -W64LIT(0x40571b7776bdf8e9), -W64LIT(0xe4f687841f7874d6), -W64LIT(0x115febad32937e98), -W64LIT(0x5108f0da442e8671), -W64LIT(0x9cab50e53c1ad12f), -W64LIT(0x33e1c8025640825d), -W64LIT(0x87d2d56bd8d73025), -W64LIT(0xc0f92d999a32fdce), -W64LIT(0x62e938d8126e042c), -W64LIT(0x4a717554a0e3677b), -W64LIT(0x0beb0414039fdf4d), -W64LIT(0xd6da25b19cf9b654), -W64LIT(0x55d6ad06fac073e7), -W64LIT(0x632452efc7af44f3), -W64LIT(0xb5fe775e5b56f2a7), -W64LIT(0x892ae694b0675a21), -W64LIT(0x7a32030f7c1525b2), -W64LIT(0x5d9f174b73e96c3e), -W64LIT(0xc35b93c010843d5a), -W64LIT(0x373f95dee8ae77cb), -W64LIT(0xfb515fd6455b604a), -W64LIT(0xa9fb11558bc326af), -W64LIT(0x22be23af64d3fcc5), -W64LIT(0xa8367b625e026670), -W64LIT(0xb8a4faf8b9505837), -W64LIT(0x785dd7612362a5f9), -W64LIT(0x588c20a018c6d977), -W64LIT(0xea0eb47b77c81ed2), -W64LIT(0xa6ce489d36b20c74), -W64LIT(0x0c97e79137c7ea4f), -W64LIT(0x7c838abd9d8c506f), -W64LIT(0x57b97968a5b7f3ac), -W64LIT(0x6c110b277ade6e28), -W64LIT(0xc785ce1cae6ac8cc), -W64LIT(0x1581b6718c7d8b0e), -W64LIT(0x614b868198d8c4b8), -W64LIT(0x27ad14440ffc498c), -W64LIT(0xdb80a8177eff1cc4), -W64LIT(0x472bf8f242e5cdeb), -W64LIT(0x8a8858cd3ad19ab5), -W64LIT(0xf60bd270a75dcada), -W64LIT(0x43f5a52efc0b387d), -W64LIT(0x6ddc6110af1f2ef7), -W64LIT(0xf0ba5bc246c4bf07), -W64LIT(0x6fb3b57ef068aebc), -W64LIT(0x18db3bd76e7b219e), -W64LIT(0x903cb7740bdd3b60), -W64LIT(0x7bff6938a9d4656d), -W64LIT(0xbdb7cd13d27fed7e), -W64LIT(0x051337eb6b2fb549), -W64LIT(0x77688ea99e138f22), -W64LIT(0xd9ef7c7921889c8f), -W64LIT(0x077ce38534583502), -W64LIT(0xf318e59bcc727f93), -W64LIT(0xb34ffeecbacf877a), -W64LIT(0xe9ac0a22fd7ede46), -W64LIT(0xfc2dbc5371035548), -W64LIT(0x026fd46e5f77804b), -W64LIT(0xe53bedb3cab93409), -W64LIT(0xcc6eca08adf51781), -W64LIT(0xe028da58a1968140), -W64LIT(0x3a6518780aa8dd5b), -W64LIT(0xce011e66f28297ca), -W64LIT(0xa4a19cf369c58c3f), -W64LIT(0xc5ea1a72f11d4887), -W64LIT(0xc427704524dc0858), -W64LIT(0x4238cf1929ca78a2), -W64LIT(0x481ea13aff94e730), -W64LIT(0xdf5ef5cbc011e952), -W64LIT(0x80ae36eeec8f0527), -W64LIT(0x5ae3f4ce47b1593c), -W64LIT(0xcda3a03f7834575e), -W64LIT(0x71d9071b7f8afaff), -W64LIT(0xcadf43ba4c6c625c), -W64LIT(0x1623082806cb4b9a), -W64LIT(0x17ee621fd30a0b45), -W64LIT(0x448946abc8530d7f), -W64LIT(0x974054f13f850e62), -W64LIT(0x73b6d37520fd7ab4), -W64LIT(0xc8b097d4131be217), -W64LIT(0x9f09eebcb6ac11bb), -W64LIT(0x45442c9c1d924da0), -W64LIT(0x1b79858ee4cde10a), -W64LIT(0x0984d07a5ce85f06), -W64LIT(0x4cc0fce6417a12a6), -W64LIT(0x99b8670e57356466), -W64LIT(0xad254c89352dd339), -W64LIT(0x322ca2358381c282), -W64LIT(0xcfcc74512743d715), -W64LIT(0x6b6de8a24e865b2a), -W64LIT(0xda4dc220ab3e5c1b), -W64LIT(0x88e78ca365a61afe), -W64LIT(0x939e092d816bfbf4), -W64LIT(0xcb12298d99ad2283), -W64LIT(0xeed0e9a7c926eb44), -W64LIT(0x98750d3982f424b9), -W64LIT(0xd5789be8164f76c0), -W64LIT(0xbe15734a58c92dea), -W64LIT(0x49d3cb0d2a55a7ef), -W64LIT(0x67fa0f337941b165), -W64LIT(0x8c39d17fdb48ef68), -W64LIT(0x25c2c02a508bc9c7), -W64LIT(0x349d2b876218b75f), -W64LIT(0x70146d2caa4bba20), -W64LIT(0x1c05660bd095d408), -W64LIT(0xfe42683d2e74d503), -W64LIT(0x9a1ad957dd83a4f2), -W64LIT(0xf2d58fac19b33f4c), -W64LIT(0x81635cd9394e45f8), -W64LIT(0xb65cc907d1e03233), -W64LIT(0xdd3121a59f666919), -W64LIT(0x318e1c6c09370216), -W64LIT(0x8b4532faef10da6a), -W64LIT(0x191651e0bbba6141), -W64LIT(0x3f762f9361876812), -W64LIT(0xb96990cf6c9118e8), -W64LIT(0xb4331d698e97b278), -W64LIT(0xd822164ef449dc50), -W64LIT(0x84706b325261f0b1), -W64LIT(0x4eaf28881e0d92ed), -W64LIT(0x69023ccc11f1db61), -W64LIT(0x66376504ac80f1ba), -W64LIT(0x0849ba4d89291fd9), -W64LIT(0xff8f020afbb595dc), -W64LIT(0x50c59aed91efc6ae), -W64LIT(0x1dc80c3c055494d7), -W64LIT(0x1e6ab2658fe25443), -W64LIT(0x3d19fbfd3ef0e859), -W64LIT(0xfa9c35e1909a2095), -W64LIT(0x52aa4e83ce9846e5), -W64LIT(0x419a7140a37cb836), -W64LIT(0xa07fc12fd72b79a9), -W64LIT(0x68cf56fbc4309bbe), -W64LIT(0x01cd6a37d5c140df), -W64LIT(0x9253631a54aabb2b), -W64LIT(0xd06bac037d60c389), -W64LIT(0x295527bb674c2388), -W64LIT(0xd204786d221743c2), -W64LIT(0x0000000000000000), -W64LIT(0xf7c6b847729c8a05), -W64LIT(0xdcfc4b924aa729c6), -W64LIT(0xe38a64012b2041d4), -W64LIT(0xb28294db6f0ec7a5), -W64LIT(0x9d663ad2e9db91f0), -W64LIT(0x91f1dd43de1c7bbf), -W64LIT(0x6086ecb64d198467), -W64LIT(0x59414a97cd0799a8), -W64LIT(0xace826bee0ec93e6), -W64LIT(0xa56cf6c4bc04cce0), -W64LIT(0x727bb942f53c3a6b), -W64LIT(0x6e7edf4925a9ee63), -W64LIT(0x26607e73da3d0953), -W64LIT(0xe75439dd95ceb442), -W64LIT(0x7990bd56f6a3e526), -W64LIT(0xecbf3dc996516b0f), -W64LIT(0x76a5e49e4bd2cffd), -W64LIT(0x968d3ec6ea444ebd), -W64LIT(0x5b2e9ef9927019e3), -W64LIT(0x6aa082959b471bf5), -W64LIT(0xbb0644a133e698a3), -W64LIT(0x830c88b76639c5b3), -W64LIT(0xe2470e36fee1010b), -W64LIT(0xb0ed40b5307947ee), -W64LIT(0x355041b0b7d9f780), -W64LIT(0x8e560511843f6f23), -W64LIT(0x7f2134e4173a90fb), -W64LIT(0x2af799e2edfae31c), -W64LIT(0x4bbc1f63752227a4), -W64LIT(0xf8f3e18fcfeda0de), -W64LIT(0x0d5a8da6e206aa90), -W64LIT(0x2c4610500c6396c1), -W64LIT(0xde939ffc15d0a98d), -W64LIT(0xaf4a98e76a5a5372), -W64LIT(0x8f9b6f2651fe2ffc), -W64LIT(0x36f2ffe93d6f3714), -W64LIT(0x0ef833ff68b06a04), -W64LIT(0xe69953ea400ff49d), -W64LIT(0x23734998b112bc1a), -W64LIT(0x3ebb45a4b44628cd), -W64LIT(0x1ab4efb9310ca1d5), -W64LIT(0x2fe4ae0986d55655), -W64LIT(0xebc3de4ca2095e0d), -W64LIT(0x536724b41b59063a), -W64LIT(0x46e692c597248d34), -W64LIT(0x2b3af3d5383ba3c3), -W64LIT(0x3ba8724fdf699d84), -W64LIT(0xc13447ae4ff3bd11), -W64LIT(0x4d0d96d194bb5279), -W64LIT(0xfde0d664a4c21597), -W64LIT(0xd7174f864938f68b), -W64LIT(0x7eec5ed3c2fbd024), -W64LIT(0xbfd8197d8d086d35), -W64LIT(0x4f6242bfcbccd232), -W64LIT(0xa70322aae3734cab), -W64LIT(0xa3dd7f765d9db93d), -W64LIT(0x94e2eaa8b533cef6), -W64LIT(0x144cdc4659bccbd1), -W64LIT(0xc648a42b7bab8813), -W64LIT(0xf93e8bb81a2ce001), -W64LIT(0xbacb2e96e627d87c), -W64LIT(0xbc7aa72407beada1), -W64LIT(0xc97dfde3c6daa2c8), -W64LIT(0xa1b2ab1802ea3976), -W64LIT(0x1fa7d8525a23149c), -W64LIT(0x75075ac7c1640f69), -W64LIT(0xe861601528bf9e99), -W64LIT(0xa2101541885cf9e2), -W64LIT(0xef1d83901ce7ab9b), -W64LIT(0x06b189b2e19975dd), -W64LIT(0x380acc1655df5d10), -W64LIT(0x1092819ae7523e47), -W64LIT(0xd3c9125af7d6031d), -W64LIT(0xd1a6c634a8a18356), -W64LIT(0x5ff0c3252c9eec75), -W64LIT(0x82c1e280b3f8856c), -W64LIT(0xed7257fe43902bd0), -W64LIT(0x3cd491caeb31a886), -/* box 6 */ -W64LIT(0x94af9eb6fad9e7df), -W64LIT(0x9208ae5e03c94ddd), -W64LIT(0x1d8de8d67158480b), -W64LIT(0xfd093cd2ba147af8), -W64LIT(0xa45ceb22e6597ccf), -W64LIT(0x9bbde6e77bf113da), -W64LIT(0xe4edf4b465fffe5c), -W64LIT(0x7125622e4e8d2a2f), -W64LIT(0x1791b81b8f68430d), -W64LIT(0xb56a63d1902195c0), -W64LIT(0xa980832b30d2ee67), -W64LIT(0x4c0a7fb384862397), -W64LIT(0xed58bc0d1dc7a05b), -W64LIT(0x5955d7f05c4d0637), -W64LIT(0xd2b9b1c8806fcf4e), -W64LIT(0x06a730e8f910aa02), -W64LIT(0xb8b60bd846aa0768), -W64LIT(0x45bf370afcbe7d90), -W64LIT(0x16f6b0375ec370a1), -W64LIT(0x892276608b81afd4), -W64LIT(0xdcccc1b5d0ec08e7), -W64LIT(0xe856949162df5f58), -W64LIT(0x82592e81a41a977e), -W64LIT(0xac8eabb74fca1164), -W64LIT(0xfac9041692afe356), -W64LIT(0x3b882d75331ba3ba), -W64LIT(0xa39cd3e6cee2e561), -W64LIT(0xd077a190d7cca9e3), -W64LIT(0x9c7dde23534a8a74), -W64LIT(0x80973ed9f3b9f1d3), -W64LIT(0xce535132209cb4e9), -W64LIT(0xaa299b5fb6dabb66), -W64LIT(0x2d7e9d426dd8d31b), -W64LIT(0x8a8b6e140d89fad5), -W64LIT(0x6ca88af83fd56224), -W64LIT(0xf5db7c4713871753), -W64LIT(0xeef1a4799bcff55a), -W64LIT(0x76e55aea6636b381), -W64LIT(0x8ee24ea4a33a367a), -W64LIT(0x25acddd7c44bbeb0), -W64LIT(0x9adaeecbaa5a2076), -W64LIT(0x0e75707d5083c7a9), -W64LIT(0x2bd9adaa94c87919), -W64LIT(0x19e4c866dfeb84a4), -W64LIT(0x129f9087f070bc0e), -W64LIT(0xd9c2e929aff4f7e4), -W64LIT(0x6f01928cb9dd3725), -W64LIT(0x39463d2d64b8c517), -W64LIT(0xebff8ce5e4d70a59), -W64LIT(0xb40d6bfd418aa66c), -W64LIT(0xf21b44833b3c8efd), -W64LIT(0x3654457ce5903112), -W64LIT(0x431807e205aed792), -W64LIT(0xb10343613e92596f), -W64LIT(0x0a1c50cdfe300b06), -W64LIT(0x778252c6b79d802d), -W64LIT(0x0cbb60250720a104), -W64LIT(0xe1e3dc281ae7015f), -W64LIT(0x0f1278518128f405), -W64LIT(0x47712752ab1d1b3d), -W64LIT(0xe24ac45c9cef545e), -W64LIT(0x1ceae0faa0f37ba7), -W64LIT(0x9814fe93fdf946db), -W64LIT(0xec3fb421cc6c93f7), -W64LIT(0x833e26ad75b1a4d2), -W64LIT(0x6b68b23c176efb8a), -W64LIT(0x4904572ffb9edc94), -W64LIT(0x4bca4777ac3dba39), -W64LIT(0x2762cd8f93e8d81d), -W64LIT(0x9eb3ce7b04e9ecd9), -W64LIT(0xc2e8311727bc15ed), -W64LIT(0xea9884c9357c39f5), -W64LIT(0xfc6e34fe6bbf4954), -W64LIT(0x13f898ab21db8fa2), -W64LIT(0xb7a47389c782f36d), -W64LIT(0x7b3932e3b0bd2129), -W64LIT(0xaf27b3c3c9c24465), -W64LIT(0xb6c37ba51629c0c1), -W64LIT(0x84fe1e695d0a3d7c), -W64LIT(0x1a4dd01259e3d1a5), -W64LIT(0xab4e9373677188ca), -W64LIT(0x90c6be06546a2b70), -W64LIT(0xf37c4cafea97bd51), -W64LIT(0x647aca6d96460f8f), -W64LIT(0x4ec46febd325453a), -W64LIT(0x3e8605e94c035cb9), -W64LIT(0x0ddc6809d68b92a8), -W64LIT(0x8bec6638dc22c979), -W64LIT(0x67d3d219104e5a8e), -W64LIT(0x2abea58645634ab5), -W64LIT(0x5b9bc7a80bee609a), -W64LIT(0x936fa672d2627e71), -W64LIT(0x7d9e020b49ad8b2b), -W64LIT(0x5832dfdc8de6359b), -W64LIT(0xc7e6198b58a4eaee), -W64LIT(0xd41e8120797f654c), -W64LIT(0xf4bc746bc22c24ff), -W64LIT(0xe084d404cb4c32f3), -W64LIT(0x48635f032a35ef38), -W64LIT(0x8757061ddb02687d), -W64LIT(0x522e8f1173d63e9d), -W64LIT(0xbcdf2b68e819cbc7), -W64LIT(0xbf76331c6e119ec6), -W64LIT(0x08d24095a9936dab), -W64LIT(0x728c7a5ac8857f2e), -W64LIT(0xd110a9bc06679a4f), -W64LIT(0x1f43f88e26fb2ea6), -W64LIT(0xb2aa5b15b89a0c6e), -W64LIT(0x4aad4f5b7d968995), -W64LIT(0x9fd4c657d542df75), -W64LIT(0x323d65cc4b23fdbd), -W64LIT(0xc38f393bf6172641), -W64LIT(0xa152c3be994183cc), -W64LIT(0x9d1ad60f82e1b9d8), -W64LIT(0xe744ecc0e3f7ab5d), -W64LIT(0x38213501b513f6bb), -W64LIT(0xade9a39b9e6122c8), -W64LIT(0x37334d50343b02be), -W64LIT(0x55eeb7d55b6da733), -W64LIT(0x970686c27cd1b2de), -W64LIT(0x427f0fced405e43e), -W64LIT(0xc026214f701f7340), -W64LIT(0x40b11f9683a68293), -W64LIT(0x02ce105857a366ad), -W64LIT(0x7e371a7fcfa5de2a), -W64LIT(0xffc72c8aedb71c55), -W64LIT(0x68c1aa489166ae8b), -W64LIT(0xc68111a7890fd942), -W64LIT(0x79f722bbe71e4784), -W64LIT(0xd579890ca8d456e0), -W64LIT(0x70426a029f261983), -W64LIT(0xb0644b4def396ac3), -W64LIT(0xdb0cf971f8579149), -W64LIT(0x5489bff98ac6949f), -W64LIT(0x046920b0aeb3ccaf), -W64LIT(0x7cf90a279806b887), -W64LIT(0x050e289c7f18ff03), -W64LIT(0x651dc24147ed3c23), -W64LIT(0x5e95ef3474f69f99), -W64LIT(0x6dcf82d4ee7e5188), -W64LIT(0x8f854688729105d6), -W64LIT(0x81f036f52212c27f), -W64LIT(0xb9d103f4970134c4), -W64LIT(0x5349873da27d0d31), -W64LIT(0x20a2f54bbb5341b3), -W64LIT(0xf0d554db6c9fe850), -W64LIT(0x07c038c428bb99ae), -W64LIT(0x30f375941c809b10), -W64LIT(0x3fe10dc59da86f15), -W64LIT(0x46162f7e7ab62891), -W64LIT(0xe623e4ec325c98f1), -W64LIT(0xfea024a63c1c2ff9), -W64LIT(0x349a5524b23357bf), -W64LIT(0x35fd5d0863986413), -W64LIT(0x96618eeead7a8172), -W64LIT(0xcb5d79ae5f844bea), -W64LIT(0x21c5fd676af8721f), -W64LIT(0x5720a78d0ccec19e), -W64LIT(0xf6726433958f4252), -W64LIT(0x8d4b56d02532637b), -W64LIT(0x24cbd5fb15e08d1c), -W64LIT(0x3aef2559e2b09016), -W64LIT(0x5afccf84da455336), -W64LIT(0x51879765f5de6b9c), -W64LIT(0x2917bdf2c36b1fb4), -W64LIT(0xa7f5f356605129ce), -W64LIT(0xc1412963a1b440ec), -W64LIT(0x3d2f1d9dca0b09b8), -W64LIT(0xa53be30e37f24f63), -W64LIT(0x5ff2e718a55dac35), -W64LIT(0xa2fbdbca1f49d6cd), -W64LIT(0xf7156c1f442471fe), -W64LIT(0x7a5e3acf61161285), -W64LIT(0xca3a71828e2f7846), -W64LIT(0x1b2ad83e8848e209), -W64LIT(0xa8e78b07e179ddcb), -W64LIT(0xef96ac554a64c6f6), -W64LIT(0x0000000000000000), -W64LIT(0x6013eadd38f5c320), -W64LIT(0x3c4815b11ba03a14), -W64LIT(0x09b548b978385e07), -W64LIT(0x226ce513ecf0271e), -W64LIT(0x63baf2a9befd9621), -W64LIT(0x44d83f262d154e3c), -W64LIT(0xcdfa4946a694e1e8), -W64LIT(0x113688f37678e90f), -W64LIT(0x859916458ca10ed0), -W64LIT(0xc52809d30f078c43), -W64LIT(0x4d6d779f552d103b), -W64LIT(0x1e24f0a2f7501d0a), -W64LIT(0x0167082cd1ab33ac), -W64LIT(0x1438a06f0960160c), -W64LIT(0xf9601c6214a7b657), -W64LIT(0xa035cb9248eab060), -W64LIT(0x50e09f4924755830), -W64LIT(0xd7b79954ff77304d), -W64LIT(0xe58afc98b454cdf0), -W64LIT(0x03a9187486085501), -W64LIT(0x62ddfa856f56a58d), -W64LIT(0xc44f01ffdeacbfef), -W64LIT(0x73eb7276192e4c82), -W64LIT(0xd6d091782edc03e1), -W64LIT(0xfbae0c3a4304d0fa), -W64LIT(0x9973f6bf2c527577), -W64LIT(0x105180dfa7d3daa3), -W64LIT(0x2605c5a34243ebb1), -W64LIT(0x91a1b62a85c118dc), -W64LIT(0xc99369f608272d47), -W64LIT(0x5d3cf740f2feca98), -W64LIT(0xcf34591ef1378745), -W64LIT(0xc8f461dad98c1eeb), -W64LIT(0x0b7b58e12f9b38aa), -W64LIT(0xe32dcc704d4467f2), -W64LIT(0x754c429ee03ee680), -W64LIT(0xd3deb9e451c4fce2), -W64LIT(0x6e669aa068760489), -W64LIT(0x66b4da35c1e56922), -W64LIT(0x4fa367c7028e7696), -W64LIT(0xba781b80110961c5), -W64LIT(0x41d617ba520db13f), -W64LIT(0x335a6de09a88ce11), -W64LIT(0xdf65d9c156e45de6), -W64LIT(0xcc9d416a773fd244), -W64LIT(0x5c5bff6c2355f934), -W64LIT(0x2870b5de12c02c18), -W64LIT(0x155fa843d8cb25a0), -W64LIT(0x78902a9736b57428), -W64LIT(0xae40bbef186977c9), -W64LIT(0x88457e4c5a2a9c78), -W64LIT(0x6a0fba10c6c5c826), -W64LIT(0x7f5012531e0eed86), -W64LIT(0x8c2c5efcf49950d7), -W64LIT(0x31947db8cd2ba8bc), -W64LIT(0x2c19956ebc73e0b7), -W64LIT(0x230bed3f3d5b14b2), -W64LIT(0x69a6a26440cd9d27), -W64LIT(0x86300e310aa95bd1), -W64LIT(0xb3cd533969313fc2), -W64LIT(0x1883c04a0e40b708), -W64LIT(0xf1b25cf7bd34dbfc), -W64LIT(0x2fb08d1a3a7bb5b6), -W64LIT(0xd8a5e1057e5fc448), -W64LIT(0xddabc99901473b4b), -W64LIT(0xde02d1ed874f6e4a), -W64LIT(0xbdb8234439b2f86b), -W64LIT(0x5647afa1dd65f232), -W64LIT(0x2ed78536ebd0861a), -W64LIT(0xe9319cbdb3746cf4), -W64LIT(0xa692fb7ab1fa1a62), -W64LIT(0x742b4ab23195d52c), -W64LIT(0x95c8969a2b72d473), -W64LIT(0x6174e2f1e95ef08c), -W64LIT(0xf807144ec50c85fb), -W64LIT(0xbe113b30bfbaad6a), -W64LIT(0xda6bf15d29fca2e5), -W64LIT(0xbb1f13acc0a25269), -/* box 7 */ -W64LIT(0xc22b27f0f9e37bf9), -W64LIT(0x93fad23f0955ef09), -W64LIT(0x32ed4b84a22a91a2), -W64LIT(0x3898b57bcc61b1cc), -W64LIT(0x55825ba9ad98e5ad), -W64LIT(0xb2eeb8069421ec94), -W64LIT(0xc7eb5875ce3c6bce), -W64LIT(0x4b1dac5d1f45851f), -W64LIT(0xc16ba1204705d847), -W64LIT(0xc5380f461a2ba91a), -W64LIT(0xb908971a909bad90), -W64LIT(0x303e1cb7763d5376), -W64LIT(0xe6ff324c53486853), -W64LIT(0x6d1aeed261f95461), -W64LIT(0x0193d1e36af1616a), -W64LIT(0x51d1f5cff0b694f0), -W64LIT(0x29b2c3f52728e127), -W64LIT(0x112a768eeb4950eb), -W64LIT(0x8fb672f86f9f4d6f), -W64LIT(0xf0c66c745bc9ea5b), -W64LIT(0x3f8b9dcd2fa9632f), -W64LIT(0x65bc471edba5b6db), -W64LIT(0x4d9d5508967c3696), -W64LIT(0x3a4be24818767318), -W64LIT(0x2794936c144db014), -W64LIT(0x2af2452599ce4299), -W64LIT(0x4a8e7dbe75b4e475), -W64LIT(0x9ddc82a63a30be3a), -W64LIT(0xade29e114c0ded4c), -W64LIT(0xd1d2064dc6bde9c6), -W64LIT(0x7da349bfe04165e0), -W64LIT(0x6b9a1787e8c0e7e8), -W64LIT(0xa54437ddf6510ff6), -W64LIT(0x2254ece92392a023), -W64LIT(0x79f0e7d9bd6f14bd), -W64LIT(0x57510c9a798f2779), -W64LIT(0x346db2d12b13222b), -W64LIT(0x54118a4ac76984c7), -W64LIT(0xefca4a6383e5eb83), -W64LIT(0xca8d8e3c43bf9943), -W64LIT(0xfc336bdebcbb79bc), -W64LIT(0x3e184c2e45580245), -W64LIT(0xf495c21206e79b06), -W64LIT(0xff73ed0e025dda02), -W64LIT(0x4228d472cfe806cf), -W64LIT(0xbcc8e89fa744bda7), -W64LIT(0xab626744c5345ec5), -W64LIT(0xb6bd1660c90f9dc9), -W64LIT(0xb72ec783a3fefca3), -W64LIT(0x8be5dc9e32b13c32), -W64LIT(0x485d2a8da1a326a1), -W64LIT(0xc6788996a4cd0aa4), -W64LIT(0x40fb83411bffc41b), -W64LIT(0x08a6a9ccba5ce2ba), -W64LIT(0xf386eaa4e52f49e5), -W64LIT(0x1acc5992eff311ef), -W64LIT(0xa2571f6b1599dd15), -W64LIT(0x44a82d2746d1b546), -W64LIT(0x70c59ff66dc2976d), -W64LIT(0x8d6525cbbb888fbb), -W64LIT(0x963aadba3e8aff3e), -W64LIT(0x7c30985c8ab0048a), -W64LIT(0x607c389bec7aa6ec), -W64LIT(0xa822e1947bd2fd7b), -W64LIT(0x034086d0bee6a3be), -W64LIT(0x66fcc1ce65431565), -W64LIT(0xb37d69e5fed08dfe), -W64LIT(0x2f323aa0ae1152ae), -W64LIT(0x56c2dd79137e4613), -W64LIT(0x31adcd541ccc321c), -W64LIT(0xdff456d4f5d8b8f5), -W64LIT(0xf9f3145b8b64698b), -W64LIT(0x764566a3e4fb24e4), -W64LIT(0x0cf507aae77293e7), -W64LIT(0x59775c034aea764a), -W64LIT(0xb89b46f9fa6accfa), -W64LIT(0xe8d962d5602d3960), -W64LIT(0x17aa8fdb6270e362), -W64LIT(0x1c4ca0c766caa266), -W64LIT(0x2de16d937a06907a), -W64LIT(0x2547c45fc05a72c0), -W64LIT(0x0fb5817a59943059), -W64LIT(0x0680f9558939b389), -W64LIT(0x16395e3808818208), -W64LIT(0xac714ff226fc8c26), -W64LIT(0xa9b1307711239c11), -W64LIT(0xec8accb33d03483d), -W64LIT(0x6c893f310b08350b), -W64LIT(0xc4abdea570dac870), -W64LIT(0xba4811ca2e7d0e2e), -W64LIT(0xf155bd9731388b31), -W64LIT(0xdd2701e721cf7a21), -W64LIT(0xe94ab3360adc580a), -W64LIT(0x23c73d0a4963c149), -W64LIT(0x5cb723867d35667d), -W64LIT(0x5042242c9a47f59a), -W64LIT(0x198cdf425115b251), -W64LIT(0x0a75feff6e4b206e), -W64LIT(0xfda0ba3dd64a18d6), -W64LIT(0xcede205a1e91e81e), -W64LIT(0xd041d7aeac4c88ac), -W64LIT(0xe42c657f875faa87), -W64LIT(0x36bee5e2ff04e0ff), -W64LIT(0x6fc9b9e1b5ee96b5), -W64LIT(0x998f2cc0671ecf67), -W64LIT(0xd301517e12aa2b12), -W64LIT(0xaea218c1f2eb4ef2), -W64LIT(0xda342951c207a8c2), -W64LIT(0x61efe978868bc786), -W64LIT(0x7f701e8c3456a734), -W64LIT(0x0be62f1c04ba4104), -W64LIT(0x9129850cdd422ddd), -W64LIT(0xd6c12efb25753b25), -W64LIT(0xe33f4dc964977864), -W64LIT(0x1579d8e8b66721b6), -W64LIT(0xf860c5b8e19508e1), -W64LIT(0x7496319030ece630), -W64LIT(0x88a55a4e8c579f8c), -W64LIT(0xcf4df1b974608974), -W64LIT(0x10b9a76d81b83181), -W64LIT(0x0e26509933655133), -W64LIT(0x43bb0591a51967a5), -W64LIT(0x926903dc63a48e63), -W64LIT(0x9c4f534550c1df50), -W64LIT(0x3bd833ab72871272), -W64LIT(0xa4d7e63e9ca06e9c), -W64LIT(0xb46e41531d185f1d), -W64LIT(0x126af05e55aff355), -W64LIT(0x24d415bcaaab13aa), -W64LIT(0x1e9ff7f4b2dd60b2), -W64LIT(0x05c07f8537df1037), -W64LIT(0x467b7a1492c67792), -W64LIT(0x2087bbdaf78562f7), -W64LIT(0x819022615cfa1c5c), -W64LIT(0xcd9ea68aa0774ba0), -W64LIT(0xa79760ee2246cd22), -W64LIT(0x8343755288edde88), -W64LIT(0x58e48de0201b1720), -W64LIT(0x7216c8c5b9d555b9), -W64LIT(0x372d340195f58195), -W64LIT(0xa11799bbab7f7eab), -W64LIT(0x9f0fd595ee277cee), -W64LIT(0x676f102d0fb2740f), -W64LIT(0x9e9c047684d61d84), -W64LIT(0x49cefb6ecb5247cb), -W64LIT(0xd41279c8f162f9f1), -W64LIT(0x1f0c2617d82c01d8), -W64LIT(0x97a97c59547b9e54), -W64LIT(0xe76ce3af39b90939), -W64LIT(0xc3b8f61393121a93), -W64LIT(0x5ba40b309efdb49e), -W64LIT(0xea0a35e6b43afbb4), -W64LIT(0x5a37dad3f40cd5f4), -W64LIT(0x14ea090bdc9640dc), -W64LIT(0x5e6474b5a922a4a9), -W64LIT(0xfee03ced68acbb68), -W64LIT(0x071328b6e3c8d2e3), -W64LIT(0x5302a2fc24a15624), -W64LIT(0x85c38c0701d46d01), -W64LIT(0x3d58cafefbbea1fb), -W64LIT(0x84505de46b250c6b), -W64LIT(0x642f96fdb154d7b1), -W64LIT(0xbf886e4f19a21e19), -W64LIT(0x02d35733d417c2d4), -W64LIT(0x68da915756264456), -W64LIT(0x8710db34d5c3afd5), -W64LIT(0x0d66d6498d83f28d), -W64LIT(0x7b23b0ea6978d669), -W64LIT(0x1b5f887185027085), -W64LIT(0x3ccb1b1d914fc091), -W64LIT(0x0453ae665d2e715d), -W64LIT(0xcb1e5fdf294ef829), -W64LIT(0xf6469521d2f059d2), -W64LIT(0xb03def3540362e40), -W64LIT(0x633cbe4b529c0552), -W64LIT(0xf7d544c2b80138b8), -W64LIT(0x7ab061090389b703), -W64LIT(0x0000000000000000), -W64LIT(0xdba7f8b2a8f6c9a8), -W64LIT(0x35fe633241e24341), -W64LIT(0x21146a399d74039d), -W64LIT(0xd581a82b9b93989b), -W64LIT(0x0935782fd0ad83d0), -W64LIT(0x5ff7a556c3d3c5c3), -W64LIT(0xaf31c922981a2f98), -W64LIT(0x90ba54efb7b34cb7), -W64LIT(0x5291731f4e50374e), -W64LIT(0xc0f870c32df4b92d), -W64LIT(0x7ee3cf6f5ea7c65e), -W64LIT(0xe07fcb19da71dbda), -W64LIT(0x4eddd3d8289a9528), -W64LIT(0x13f921bd3f5e923f), -W64LIT(0xf50613f16c16fa6c), -W64LIT(0x981cfd230defae0d), -W64LIT(0x4c0e84ebfc8d57fc), -W64LIT(0x82d0a4b1e21cbfe2), -W64LIT(0x89368bade6a6fee6), -W64LIT(0xd292809d785b4a78), -W64LIT(0x47e8abf7f83716f8), -W64LIT(0x8e25a31b056e2c05), -W64LIT(0xd752ff184f845a4f), -W64LIT(0xcc0d7769ca862aca), -W64LIT(0x694940b43cd7253c), -W64LIT(0x2ea1eb43c4e033c4), -W64LIT(0xde6787379f29d99f), -W64LIT(0x181f0ea13be4d33b), -W64LIT(0x416852a2710ea571), -W64LIT(0x62af6fa8386d6438), -W64LIT(0xa0844858c18e1fc1), -W64LIT(0x337e9a67c8dbf0c8), -W64LIT(0x2c72bc7010f7f110), -W64LIT(0xbd5b397ccdb5dccd), -W64LIT(0xd8e77e6216106a16), -W64LIT(0x86830ad7bf32cebf), -W64LIT(0x4f4e023b426bf442), -W64LIT(0xe5bfb49cedaecbed), -W64LIT(0x8a760d7d58405d58), -W64LIT(0xe2ac9c2a0e66190e), -W64LIT(0xb5fd90b077e93e77), -W64LIT(0xdcb4d0044b3e1b4b), -W64LIT(0x453bfcc42c20d42c), -W64LIT(0xed191d5057f22957), -W64LIT(0xe1ec1afab080bab0), -W64LIT(0xee599b80e9148ae9), -W64LIT(0x2607428f7ebcd17e), -W64LIT(0x5d24f26517c40717), -W64LIT(0x6a09c66482318682), -W64LIT(0xa604b10d48b7ac48), -W64LIT(0xbe1bbfac73537f73), -W64LIT(0x282112164dd9804d), -W64LIT(0x7505e0735a1d875a), -W64LIT(0x73851926d32434d3), -W64LIT(0xd974af817ce10b7c), -W64LIT(0xeb99e405decb9ade), -W64LIT(0x9b5c7bf3b3090db3), -W64LIT(0xfab3928b3582ca35), -W64LIT(0x8003f382360b7d36), -W64LIT(0x94e9fa89ea9d3dea), -W64LIT(0xb1ae3ed62ac74f2a), -W64LIT(0x9acfaa10d9f86cd9), -W64LIT(0x390b6498a690d0a6), -W64LIT(0xf2153b478fde288f), -W64LIT(0x71564e150733f607), -W64LIT(0xa3c4ce887f68bc7f), -W64LIT(0xaaf1b6a7afc53faf), -W64LIT(0x1ddf71240c3bc30c), -W64LIT(0x77d6b7408e0a458e), -W64LIT(0x2b6194c6f33f23f3), -W64LIT(0xc9cd08ecfd593afd), -W64LIT(0xc85ed90f97a85b97), -W64LIT(0x8cf6f428d179eed1), -W64LIT(0x957a2b6a806c5c80), -W64LIT(0xbbdbc029448c6f44), -W64LIT(0x7863363ad79e75d7), -W64LIT(0x6e5a6802df1ff7df), -W64LIT(0xfb2043685f73ab5f), -}; - -NAMESPACE_END diff --git a/CryptoPP/skipjack.cpp b/CryptoPP/skipjack.cpp deleted file mode 100644 index dad14bd76..000000000 --- a/CryptoPP/skipjack.cpp +++ /dev/null @@ -1,202 +0,0 @@ -// skipjack.cpp - modified by Wei Dai from Paulo Barreto's skipjack32.c, -// which is public domain according to his web site. - -#include "pch.h" - -#ifndef CRYPTOPP_IMPORTS - -#include "skipjack.h" - -/* - * Optimized implementation of SKIPJACK algorithm - * - * originally written by Panu Rissanen <bande@lut.fi> 1998.06.24 - * optimized by Mark Tillotson <markt@chaos.org.uk> 1998.06.25 - * optimized by Paulo Barreto <pbarreto@nw.com.br> 1998.06.30 - */ - -NAMESPACE_BEGIN(CryptoPP) - -/** - * The F-table byte permutation (see description of the G-box permutation) - */ -const byte SKIPJACK::Base::fTable[256] = { - 0xa3,0xd7,0x09,0x83,0xf8,0x48,0xf6,0xf4,0xb3,0x21,0x15,0x78,0x99,0xb1,0xaf,0xf9, - 0xe7,0x2d,0x4d,0x8a,0xce,0x4c,0xca,0x2e,0x52,0x95,0xd9,0x1e,0x4e,0x38,0x44,0x28, - 0x0a,0xdf,0x02,0xa0,0x17,0xf1,0x60,0x68,0x12,0xb7,0x7a,0xc3,0xe9,0xfa,0x3d,0x53, - 0x96,0x84,0x6b,0xba,0xf2,0x63,0x9a,0x19,0x7c,0xae,0xe5,0xf5,0xf7,0x16,0x6a,0xa2, - 0x39,0xb6,0x7b,0x0f,0xc1,0x93,0x81,0x1b,0xee,0xb4,0x1a,0xea,0xd0,0x91,0x2f,0xb8, - 0x55,0xb9,0xda,0x85,0x3f,0x41,0xbf,0xe0,0x5a,0x58,0x80,0x5f,0x66,0x0b,0xd8,0x90, - 0x35,0xd5,0xc0,0xa7,0x33,0x06,0x65,0x69,0x45,0x00,0x94,0x56,0x6d,0x98,0x9b,0x76, - 0x97,0xfc,0xb2,0xc2,0xb0,0xfe,0xdb,0x20,0xe1,0xeb,0xd6,0xe4,0xdd,0x47,0x4a,0x1d, - 0x42,0xed,0x9e,0x6e,0x49,0x3c,0xcd,0x43,0x27,0xd2,0x07,0xd4,0xde,0xc7,0x67,0x18, - 0x89,0xcb,0x30,0x1f,0x8d,0xc6,0x8f,0xaa,0xc8,0x74,0xdc,0xc9,0x5d,0x5c,0x31,0xa4, - 0x70,0x88,0x61,0x2c,0x9f,0x0d,0x2b,0x87,0x50,0x82,0x54,0x64,0x26,0x7d,0x03,0x40, - 0x34,0x4b,0x1c,0x73,0xd1,0xc4,0xfd,0x3b,0xcc,0xfb,0x7f,0xab,0xe6,0x3e,0x5b,0xa5, - 0xad,0x04,0x23,0x9c,0x14,0x51,0x22,0xf0,0x29,0x79,0x71,0x7e,0xff,0x8c,0x0e,0xe2, - 0x0c,0xef,0xbc,0x72,0x75,0x6f,0x37,0xa1,0xec,0xd3,0x8e,0x62,0x8b,0x86,0x10,0xe8, - 0x08,0x77,0x11,0xbe,0x92,0x4f,0x24,0xc5,0x32,0x36,0x9d,0xcf,0xf3,0xa6,0xbb,0xac, - 0x5e,0x6c,0xa9,0x13,0x57,0x25,0xb5,0xe3,0xbd,0xa8,0x3a,0x01,0x05,0x59,0x2a,0x46 -}; - -/** - * The key-dependent permutation G on V^16 is a four-round Feistel network. - * The round function is a fixed byte-substitution table (permutation on V^8), - * the F-table. Each round of G incorporates a single byte from the key. - */ -#define g(tab, w, i, j, k, l) \ -{ \ - w ^= (word)tab[i*256 + (w & 0xff)] << 8; \ - w ^= (word)tab[j*256 + (w >> 8)]; \ - w ^= (word)tab[k*256 + (w & 0xff)] << 8; \ - w ^= (word)tab[l*256 + (w >> 8)]; \ -} - -#define g0(tab, w) g(tab, w, 0, 1, 2, 3) -#define g1(tab, w) g(tab, w, 4, 5, 6, 7) -#define g2(tab, w) g(tab, w, 8, 9, 0, 1) -#define g3(tab, w) g(tab, w, 2, 3, 4, 5) -#define g4(tab, w) g(tab, w, 6, 7, 8, 9) - -/** - * The inverse of the G permutation. - */ -#define h(tab, w, i, j, k, l) \ -{ \ - w ^= (word)tab[l*256 + (w >> 8)]; \ - w ^= (word)tab[k*256 + (w & 0xff)] << 8; \ - w ^= (word)tab[j*256 + (w >> 8)]; \ - w ^= (word)tab[i*256 + (w & 0xff)] << 8; \ -} - -#define h0(tab, w) h(tab, w, 0, 1, 2, 3) -#define h1(tab, w) h(tab, w, 4, 5, 6, 7) -#define h2(tab, w) h(tab, w, 8, 9, 0, 1) -#define h3(tab, w) h(tab, w, 2, 3, 4, 5) -#define h4(tab, w) h(tab, w, 6, 7, 8, 9) - -/** - * Preprocess a user key into a table to save an XOR at each F-table access. - */ -void SKIPJACK::Base::UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &) -{ - AssertValidKeyLength(length); - - /* tab[i][c] = fTable[c ^ key[i]] */ - int i; - for (i = 0; i < 10; i++) { - byte *t = tab+i*256, k = key[9-i]; - int c; - for (c = 0; c < 256; c++) { - t[c] = fTable[c ^ k]; - } - } -} - -typedef BlockGetAndPut<word16, LittleEndian> Block; - -/** - * Encrypt a single block of data. - */ -void SKIPJACK::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word16 w1, w2, w3, w4; - Block::Get(inBlock)(w4)(w3)(w2)(w1); - - /* stepping rule A: */ - g0(tab, w1); w4 ^= w1 ^ 1; - g1(tab, w4); w3 ^= w4 ^ 2; - g2(tab, w3); w2 ^= w3 ^ 3; - g3(tab, w2); w1 ^= w2 ^ 4; - g4(tab, w1); w4 ^= w1 ^ 5; - g0(tab, w4); w3 ^= w4 ^ 6; - g1(tab, w3); w2 ^= w3 ^ 7; - g2(tab, w2); w1 ^= w2 ^ 8; - - /* stepping rule B: */ - w2 ^= w1 ^ 9; g3(tab, w1); - w1 ^= w4 ^ 10; g4(tab, w4); - w4 ^= w3 ^ 11; g0(tab, w3); - w3 ^= w2 ^ 12; g1(tab, w2); - w2 ^= w1 ^ 13; g2(tab, w1); - w1 ^= w4 ^ 14; g3(tab, w4); - w4 ^= w3 ^ 15; g4(tab, w3); - w3 ^= w2 ^ 16; g0(tab, w2); - - /* stepping rule A: */ - g1(tab, w1); w4 ^= w1 ^ 17; - g2(tab, w4); w3 ^= w4 ^ 18; - g3(tab, w3); w2 ^= w3 ^ 19; - g4(tab, w2); w1 ^= w2 ^ 20; - g0(tab, w1); w4 ^= w1 ^ 21; - g1(tab, w4); w3 ^= w4 ^ 22; - g2(tab, w3); w2 ^= w3 ^ 23; - g3(tab, w2); w1 ^= w2 ^ 24; - - /* stepping rule B: */ - w2 ^= w1 ^ 25; g4(tab, w1); - w1 ^= w4 ^ 26; g0(tab, w4); - w4 ^= w3 ^ 27; g1(tab, w3); - w3 ^= w2 ^ 28; g2(tab, w2); - w2 ^= w1 ^ 29; g3(tab, w1); - w1 ^= w4 ^ 30; g4(tab, w4); - w4 ^= w3 ^ 31; g0(tab, w3); - w3 ^= w2 ^ 32; g1(tab, w2); - - Block::Put(xorBlock, outBlock)(w4)(w3)(w2)(w1); -} - -/** - * Decrypt a single block of data. - */ -void SKIPJACK::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word16 w1, w2, w3, w4; - Block::Get(inBlock)(w4)(w3)(w2)(w1); - - /* stepping rule A: */ - h1(tab, w2); w3 ^= w2 ^ 32; - h0(tab, w3); w4 ^= w3 ^ 31; - h4(tab, w4); w1 ^= w4 ^ 30; - h3(tab, w1); w2 ^= w1 ^ 29; - h2(tab, w2); w3 ^= w2 ^ 28; - h1(tab, w3); w4 ^= w3 ^ 27; - h0(tab, w4); w1 ^= w4 ^ 26; - h4(tab, w1); w2 ^= w1 ^ 25; - - /* stepping rule B: */ - w1 ^= w2 ^ 24; h3(tab, w2); - w2 ^= w3 ^ 23; h2(tab, w3); - w3 ^= w4 ^ 22; h1(tab, w4); - w4 ^= w1 ^ 21; h0(tab, w1); - w1 ^= w2 ^ 20; h4(tab, w2); - w2 ^= w3 ^ 19; h3(tab, w3); - w3 ^= w4 ^ 18; h2(tab, w4); - w4 ^= w1 ^ 17; h1(tab, w1); - - /* stepping rule A: */ - h0(tab, w2); w3 ^= w2 ^ 16; - h4(tab, w3); w4 ^= w3 ^ 15; - h3(tab, w4); w1 ^= w4 ^ 14; - h2(tab, w1); w2 ^= w1 ^ 13; - h1(tab, w2); w3 ^= w2 ^ 12; - h0(tab, w3); w4 ^= w3 ^ 11; - h4(tab, w4); w1 ^= w4 ^ 10; - h3(tab, w1); w2 ^= w1 ^ 9; - - /* stepping rule B: */ - w1 ^= w2 ^ 8; h2(tab, w2); - w2 ^= w3 ^ 7; h1(tab, w3); - w3 ^= w4 ^ 6; h0(tab, w4); - w4 ^= w1 ^ 5; h4(tab, w1); - w1 ^= w2 ^ 4; h3(tab, w2); - w2 ^= w3 ^ 3; h2(tab, w3); - w3 ^= w4 ^ 2; h1(tab, w4); - w4 ^= w1 ^ 1; h0(tab, w1); - - Block::Put(xorBlock, outBlock)(w4)(w3)(w2)(w1); -} - -NAMESPACE_END - -#endif diff --git a/CryptoPP/skipjack.h b/CryptoPP/skipjack.h deleted file mode 100644 index 6b1264737..000000000 --- a/CryptoPP/skipjack.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef CRYPTOPP_SKIPJACK_H -#define CRYPTOPP_SKIPJACK_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct SKIPJACK_Info : public FixedBlockSize<8>, public FixedKeyLength<10> -{ - CRYPTOPP_DLL static const char * CRYPTOPP_API StaticAlgorithmName() {return "SKIPJACK";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#SKIPJACK">SKIPJACK</a> -class SKIPJACK : public SKIPJACK_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SKIPJACK_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - unsigned int OptimalDataAlignment() const {return GetAlignmentOf<word16>();} - - protected: - static const byte fTable[256]; - - FixedSizeSecBlock<byte, 10*256> tab; - }; - - class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - private: - static const byte Se[256]; - static const word32 Te[4][256]; - }; - - class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - private: - static const byte Sd[256]; - static const word32 Td[4][256]; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef SKIPJACK::Encryption SKIPJACKEncryption; -typedef SKIPJACK::Decryption SKIPJACKDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/tftables.cpp b/CryptoPP/tftables.cpp deleted file mode 100644 index dc654cf0f..000000000 --- a/CryptoPP/tftables.cpp +++ /dev/null @@ -1,317 +0,0 @@ -// Twofish tables - -#include "pch.h" -#include "twofish.h" - -NAMESPACE_BEGIN(CryptoPP) - -const byte Twofish::Base::q[2][256] = { - 0xA9, 0x67, 0xB3, 0xE8, 0x04, 0xFD, 0xA3, 0x76, 0x9A, 0x92, 0x80, 0x78, - 0xE4, 0xDD, 0xD1, 0x38, 0x0D, 0xC6, 0x35, 0x98, 0x18, 0xF7, 0xEC, 0x6C, - 0x43, 0x75, 0x37, 0x26, 0xFA, 0x13, 0x94, 0x48, 0xF2, 0xD0, 0x8B, 0x30, - 0x84, 0x54, 0xDF, 0x23, 0x19, 0x5B, 0x3D, 0x59, 0xF3, 0xAE, 0xA2, 0x82, - 0x63, 0x01, 0x83, 0x2E, 0xD9, 0x51, 0x9B, 0x7C, 0xA6, 0xEB, 0xA5, 0xBE, - 0x16, 0x0C, 0xE3, 0x61, 0xC0, 0x8C, 0x3A, 0xF5, 0x73, 0x2C, 0x25, 0x0B, - 0xBB, 0x4E, 0x89, 0x6B, 0x53, 0x6A, 0xB4, 0xF1, 0xE1, 0xE6, 0xBD, 0x45, - 0xE2, 0xF4, 0xB6, 0x66, 0xCC, 0x95, 0x03, 0x56, 0xD4, 0x1C, 0x1E, 0xD7, - 0xFB, 0xC3, 0x8E, 0xB5, 0xE9, 0xCF, 0xBF, 0xBA, 0xEA, 0x77, 0x39, 0xAF, - 0x33, 0xC9, 0x62, 0x71, 0x81, 0x79, 0x09, 0xAD, 0x24, 0xCD, 0xF9, 0xD8, - 0xE5, 0xC5, 0xB9, 0x4D, 0x44, 0x08, 0x86, 0xE7, 0xA1, 0x1D, 0xAA, 0xED, - 0x06, 0x70, 0xB2, 0xD2, 0x41, 0x7B, 0xA0, 0x11, 0x31, 0xC2, 0x27, 0x90, - 0x20, 0xF6, 0x60, 0xFF, 0x96, 0x5C, 0xB1, 0xAB, 0x9E, 0x9C, 0x52, 0x1B, - 0x5F, 0x93, 0x0A, 0xEF, 0x91, 0x85, 0x49, 0xEE, 0x2D, 0x4F, 0x8F, 0x3B, - 0x47, 0x87, 0x6D, 0x46, 0xD6, 0x3E, 0x69, 0x64, 0x2A, 0xCE, 0xCB, 0x2F, - 0xFC, 0x97, 0x05, 0x7A, 0xAC, 0x7F, 0xD5, 0x1A, 0x4B, 0x0E, 0xA7, 0x5A, - 0x28, 0x14, 0x3F, 0x29, 0x88, 0x3C, 0x4C, 0x02, 0xB8, 0xDA, 0xB0, 0x17, - 0x55, 0x1F, 0x8A, 0x7D, 0x57, 0xC7, 0x8D, 0x74, 0xB7, 0xC4, 0x9F, 0x72, - 0x7E, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34, 0x6E, 0x50, 0xDE, 0x68, - 0x65, 0xBC, 0xDB, 0xF8, 0xC8, 0xA8, 0x2B, 0x40, 0xDC, 0xFE, 0x32, 0xA4, - 0xCA, 0x10, 0x21, 0xF0, 0xD3, 0x5D, 0x0F, 0x00, 0x6F, 0x9D, 0x36, 0x42, - 0x4A, 0x5E, 0xC1, 0xE0, - - 0x75, 0xF3, 0xC6, 0xF4, 0xDB, 0x7B, 0xFB, 0xC8, 0x4A, 0xD3, 0xE6, 0x6B, - 0x45, 0x7D, 0xE8, 0x4B, 0xD6, 0x32, 0xD8, 0xFD, 0x37, 0x71, 0xF1, 0xE1, - 0x30, 0x0F, 0xF8, 0x1B, 0x87, 0xFA, 0x06, 0x3F, 0x5E, 0xBA, 0xAE, 0x5B, - 0x8A, 0x00, 0xBC, 0x9D, 0x6D, 0xC1, 0xB1, 0x0E, 0x80, 0x5D, 0xD2, 0xD5, - 0xA0, 0x84, 0x07, 0x14, 0xB5, 0x90, 0x2C, 0xA3, 0xB2, 0x73, 0x4C, 0x54, - 0x92, 0x74, 0x36, 0x51, 0x38, 0xB0, 0xBD, 0x5A, 0xFC, 0x60, 0x62, 0x96, - 0x6C, 0x42, 0xF7, 0x10, 0x7C, 0x28, 0x27, 0x8C, 0x13, 0x95, 0x9C, 0xC7, - 0x24, 0x46, 0x3B, 0x70, 0xCA, 0xE3, 0x85, 0xCB, 0x11, 0xD0, 0x93, 0xB8, - 0xA6, 0x83, 0x20, 0xFF, 0x9F, 0x77, 0xC3, 0xCC, 0x03, 0x6F, 0x08, 0xBF, - 0x40, 0xE7, 0x2B, 0xE2, 0x79, 0x0C, 0xAA, 0x82, 0x41, 0x3A, 0xEA, 0xB9, - 0xE4, 0x9A, 0xA4, 0x97, 0x7E, 0xDA, 0x7A, 0x17, 0x66, 0x94, 0xA1, 0x1D, - 0x3D, 0xF0, 0xDE, 0xB3, 0x0B, 0x72, 0xA7, 0x1C, 0xEF, 0xD1, 0x53, 0x3E, - 0x8F, 0x33, 0x26, 0x5F, 0xEC, 0x76, 0x2A, 0x49, 0x81, 0x88, 0xEE, 0x21, - 0xC4, 0x1A, 0xEB, 0xD9, 0xC5, 0x39, 0x99, 0xCD, 0xAD, 0x31, 0x8B, 0x01, - 0x18, 0x23, 0xDD, 0x1F, 0x4E, 0x2D, 0xF9, 0x48, 0x4F, 0xF2, 0x65, 0x8E, - 0x78, 0x5C, 0x58, 0x19, 0x8D, 0xE5, 0x98, 0x57, 0x67, 0x7F, 0x05, 0x64, - 0xAF, 0x63, 0xB6, 0xFE, 0xF5, 0xB7, 0x3C, 0xA5, 0xCE, 0xE9, 0x68, 0x44, - 0xE0, 0x4D, 0x43, 0x69, 0x29, 0x2E, 0xAC, 0x15, 0x59, 0xA8, 0x0A, 0x9E, - 0x6E, 0x47, 0xDF, 0x34, 0x35, 0x6A, 0xCF, 0xDC, 0x22, 0xC9, 0xC0, 0x9B, - 0x89, 0xD4, 0xED, 0xAB, 0x12, 0xA2, 0x0D, 0x52, 0xBB, 0x02, 0x2F, 0xA9, - 0xD7, 0x61, 0x1E, 0xB4, 0x50, 0x04, 0xF6, 0xC2, 0x16, 0x25, 0x86, 0x56, - 0x55, 0x09, 0xBE, 0x91 -}; - -const word32 Twofish::Base::mds[4][256] = { - 0xbcbc3275, 0xecec21f3, 0x202043c6, 0xb3b3c9f4, - 0xdada03db, 0x02028b7b, 0xe2e22bfb, 0x9e9efac8, - 0xc9c9ec4a, 0xd4d409d3, 0x18186be6, 0x1e1e9f6b, - 0x98980e45, 0xb2b2387d, 0xa6a6d2e8, 0x2626b74b, - 0x3c3c57d6, 0x93938a32, 0x8282eed8, 0x525298fd, - 0x7b7bd437, 0xbbbb3771, 0x5b5b97f1, 0x474783e1, - 0x24243c30, 0x5151e20f, 0xbabac6f8, 0x4a4af31b, - 0xbfbf4887, 0x0d0d70fa, 0xb0b0b306, 0x7575de3f, - 0xd2d2fd5e, 0x7d7d20ba, 0x666631ae, 0x3a3aa35b, - 0x59591c8a, 0x00000000, 0xcdcd93bc, 0x1a1ae09d, - 0xaeae2c6d, 0x7f7fabc1, 0x2b2bc7b1, 0xbebeb90e, - 0xe0e0a080, 0x8a8a105d, 0x3b3b52d2, 0x6464bad5, - 0xd8d888a0, 0xe7e7a584, 0x5f5fe807, 0x1b1b1114, - 0x2c2cc2b5, 0xfcfcb490, 0x3131272c, 0x808065a3, - 0x73732ab2, 0x0c0c8173, 0x79795f4c, 0x6b6b4154, - 0x4b4b0292, 0x53536974, 0x94948f36, 0x83831f51, - 0x2a2a3638, 0xc4c49cb0, 0x2222c8bd, 0xd5d5f85a, - 0xbdbdc3fc, 0x48487860, 0xffffce62, 0x4c4c0796, - 0x4141776c, 0xc7c7e642, 0xebeb24f7, 0x1c1c1410, - 0x5d5d637c, 0x36362228, 0x6767c027, 0xe9e9af8c, - 0x4444f913, 0x1414ea95, 0xf5f5bb9c, 0xcfcf18c7, - 0x3f3f2d24, 0xc0c0e346, 0x7272db3b, 0x54546c70, - 0x29294cca, 0xf0f035e3, 0x0808fe85, 0xc6c617cb, - 0xf3f34f11, 0x8c8ce4d0, 0xa4a45993, 0xcaca96b8, - 0x68683ba6, 0xb8b84d83, 0x38382820, 0xe5e52eff, - 0xadad569f, 0x0b0b8477, 0xc8c81dc3, 0x9999ffcc, - 0x5858ed03, 0x19199a6f, 0x0e0e0a08, 0x95957ebf, - 0x70705040, 0xf7f730e7, 0x6e6ecf2b, 0x1f1f6ee2, - 0xb5b53d79, 0x09090f0c, 0x616134aa, 0x57571682, - 0x9f9f0b41, 0x9d9d803a, 0x111164ea, 0x2525cdb9, - 0xafafdde4, 0x4545089a, 0xdfdf8da4, 0xa3a35c97, - 0xeaead57e, 0x353558da, 0xededd07a, 0x4343fc17, - 0xf8f8cb66, 0xfbfbb194, 0x3737d3a1, 0xfafa401d, - 0xc2c2683d, 0xb4b4ccf0, 0x32325dde, 0x9c9c71b3, - 0x5656e70b, 0xe3e3da72, 0x878760a7, 0x15151b1c, - 0xf9f93aef, 0x6363bfd1, 0x3434a953, 0x9a9a853e, - 0xb1b1428f, 0x7c7cd133, 0x88889b26, 0x3d3da65f, - 0xa1a1d7ec, 0xe4e4df76, 0x8181942a, 0x91910149, - 0x0f0ffb81, 0xeeeeaa88, 0x161661ee, 0xd7d77321, - 0x9797f5c4, 0xa5a5a81a, 0xfefe3feb, 0x6d6db5d9, - 0x7878aec5, 0xc5c56d39, 0x1d1de599, 0x7676a4cd, - 0x3e3edcad, 0xcbcb6731, 0xb6b6478b, 0xefef5b01, - 0x12121e18, 0x6060c523, 0x6a6ab0dd, 0x4d4df61f, - 0xcecee94e, 0xdede7c2d, 0x55559df9, 0x7e7e5a48, - 0x2121b24f, 0x03037af2, 0xa0a02665, 0x5e5e198e, - 0x5a5a6678, 0x65654b5c, 0x62624e58, 0xfdfd4519, - 0x0606f48d, 0x404086e5, 0xf2f2be98, 0x3333ac57, - 0x17179067, 0x05058e7f, 0xe8e85e05, 0x4f4f7d64, - 0x89896aaf, 0x10109563, 0x74742fb6, 0x0a0a75fe, - 0x5c5c92f5, 0x9b9b74b7, 0x2d2d333c, 0x3030d6a5, - 0x2e2e49ce, 0x494989e9, 0x46467268, 0x77775544, - 0xa8a8d8e0, 0x9696044d, 0x2828bd43, 0xa9a92969, - 0xd9d97929, 0x8686912e, 0xd1d187ac, 0xf4f44a15, - 0x8d8d1559, 0xd6d682a8, 0xb9b9bc0a, 0x42420d9e, - 0xf6f6c16e, 0x2f2fb847, 0xdddd06df, 0x23233934, - 0xcccc6235, 0xf1f1c46a, 0xc1c112cf, 0x8585ebdc, - 0x8f8f9e22, 0x7171a1c9, 0x9090f0c0, 0xaaaa539b, - 0x0101f189, 0x8b8be1d4, 0x4e4e8ced, 0x8e8e6fab, - 0xababa212, 0x6f6f3ea2, 0xe6e6540d, 0xdbdbf252, - 0x92927bbb, 0xb7b7b602, 0x6969ca2f, 0x3939d9a9, - 0xd3d30cd7, 0xa7a72361, 0xa2a2ad1e, 0xc3c399b4, - 0x6c6c4450, 0x07070504, 0x04047ff6, 0x272746c2, - 0xacaca716, 0xd0d07625, 0x50501386, 0xdcdcf756, - 0x84841a55, 0xe1e15109, 0x7a7a25be, 0x1313ef91, - - 0xa9d93939, 0x67901717, 0xb3719c9c, 0xe8d2a6a6, - 0x04050707, 0xfd985252, 0xa3658080, 0x76dfe4e4, - 0x9a084545, 0x92024b4b, 0x80a0e0e0, 0x78665a5a, - 0xe4ddafaf, 0xddb06a6a, 0xd1bf6363, 0x38362a2a, - 0x0d54e6e6, 0xc6432020, 0x3562cccc, 0x98bef2f2, - 0x181e1212, 0xf724ebeb, 0xecd7a1a1, 0x6c774141, - 0x43bd2828, 0x7532bcbc, 0x37d47b7b, 0x269b8888, - 0xfa700d0d, 0x13f94444, 0x94b1fbfb, 0x485a7e7e, - 0xf27a0303, 0xd0e48c8c, 0x8b47b6b6, 0x303c2424, - 0x84a5e7e7, 0x54416b6b, 0xdf06dddd, 0x23c56060, - 0x1945fdfd, 0x5ba33a3a, 0x3d68c2c2, 0x59158d8d, - 0xf321ecec, 0xae316666, 0xa23e6f6f, 0x82165757, - 0x63951010, 0x015befef, 0x834db8b8, 0x2e918686, - 0xd9b56d6d, 0x511f8383, 0x9b53aaaa, 0x7c635d5d, - 0xa63b6868, 0xeb3ffefe, 0xa5d63030, 0xbe257a7a, - 0x16a7acac, 0x0c0f0909, 0xe335f0f0, 0x6123a7a7, - 0xc0f09090, 0x8cafe9e9, 0x3a809d9d, 0xf5925c5c, - 0x73810c0c, 0x2c273131, 0x2576d0d0, 0x0be75656, - 0xbb7b9292, 0x4ee9cece, 0x89f10101, 0x6b9f1e1e, - 0x53a93434, 0x6ac4f1f1, 0xb499c3c3, 0xf1975b5b, - 0xe1834747, 0xe66b1818, 0xbdc82222, 0x450e9898, - 0xe26e1f1f, 0xf4c9b3b3, 0xb62f7474, 0x66cbf8f8, - 0xccff9999, 0x95ea1414, 0x03ed5858, 0x56f7dcdc, - 0xd4e18b8b, 0x1c1b1515, 0x1eada2a2, 0xd70cd3d3, - 0xfb2be2e2, 0xc31dc8c8, 0x8e195e5e, 0xb5c22c2c, - 0xe9894949, 0xcf12c1c1, 0xbf7e9595, 0xba207d7d, - 0xea641111, 0x77840b0b, 0x396dc5c5, 0xaf6a8989, - 0x33d17c7c, 0xc9a17171, 0x62ceffff, 0x7137bbbb, - 0x81fb0f0f, 0x793db5b5, 0x0951e1e1, 0xaddc3e3e, - 0x242d3f3f, 0xcda47676, 0xf99d5555, 0xd8ee8282, - 0xe5864040, 0xc5ae7878, 0xb9cd2525, 0x4d049696, - 0x44557777, 0x080a0e0e, 0x86135050, 0xe730f7f7, - 0xa1d33737, 0x1d40fafa, 0xaa346161, 0xed8c4e4e, - 0x06b3b0b0, 0x706c5454, 0xb22a7373, 0xd2523b3b, - 0x410b9f9f, 0x7b8b0202, 0xa088d8d8, 0x114ff3f3, - 0x3167cbcb, 0xc2462727, 0x27c06767, 0x90b4fcfc, - 0x20283838, 0xf67f0404, 0x60784848, 0xff2ee5e5, - 0x96074c4c, 0x5c4b6565, 0xb1c72b2b, 0xab6f8e8e, - 0x9e0d4242, 0x9cbbf5f5, 0x52f2dbdb, 0x1bf34a4a, - 0x5fa63d3d, 0x9359a4a4, 0x0abcb9b9, 0xef3af9f9, - 0x91ef1313, 0x85fe0808, 0x49019191, 0xee611616, - 0x2d7cdede, 0x4fb22121, 0x8f42b1b1, 0x3bdb7272, - 0x47b82f2f, 0x8748bfbf, 0x6d2caeae, 0x46e3c0c0, - 0xd6573c3c, 0x3e859a9a, 0x6929a9a9, 0x647d4f4f, - 0x2a948181, 0xce492e2e, 0xcb17c6c6, 0x2fca6969, - 0xfcc3bdbd, 0x975ca3a3, 0x055ee8e8, 0x7ad0eded, - 0xac87d1d1, 0x7f8e0505, 0xd5ba6464, 0x1aa8a5a5, - 0x4bb72626, 0x0eb9bebe, 0xa7608787, 0x5af8d5d5, - 0x28223636, 0x14111b1b, 0x3fde7575, 0x2979d9d9, - 0x88aaeeee, 0x3c332d2d, 0x4c5f7979, 0x02b6b7b7, - 0xb896caca, 0xda583535, 0xb09cc4c4, 0x17fc4343, - 0x551a8484, 0x1ff64d4d, 0x8a1c5959, 0x7d38b2b2, - 0x57ac3333, 0xc718cfcf, 0x8df40606, 0x74695353, - 0xb7749b9b, 0xc4f59797, 0x9f56adad, 0x72dae3e3, - 0x7ed5eaea, 0x154af4f4, 0x229e8f8f, 0x12a2abab, - 0x584e6262, 0x07e85f5f, 0x99e51d1d, 0x34392323, - 0x6ec1f6f6, 0x50446c6c, 0xde5d3232, 0x68724646, - 0x6526a0a0, 0xbc93cdcd, 0xdb03dada, 0xf8c6baba, - 0xc8fa9e9e, 0xa882d6d6, 0x2bcf6e6e, 0x40507070, - 0xdceb8585, 0xfe750a0a, 0x328a9393, 0xa48ddfdf, - 0xca4c2929, 0x10141c1c, 0x2173d7d7, 0xf0ccb4b4, - 0xd309d4d4, 0x5d108a8a, 0x0fe25151, 0x00000000, - 0x6f9a1919, 0x9de01a1a, 0x368f9494, 0x42e6c7c7, - 0x4aecc9c9, 0x5efdd2d2, 0xc1ab7f7f, 0xe0d8a8a8, - - 0xbc75bc32, 0xecf3ec21, 0x20c62043, 0xb3f4b3c9, - 0xdadbda03, 0x027b028b, 0xe2fbe22b, 0x9ec89efa, - 0xc94ac9ec, 0xd4d3d409, 0x18e6186b, 0x1e6b1e9f, - 0x9845980e, 0xb27db238, 0xa6e8a6d2, 0x264b26b7, - 0x3cd63c57, 0x9332938a, 0x82d882ee, 0x52fd5298, - 0x7b377bd4, 0xbb71bb37, 0x5bf15b97, 0x47e14783, - 0x2430243c, 0x510f51e2, 0xbaf8bac6, 0x4a1b4af3, - 0xbf87bf48, 0x0dfa0d70, 0xb006b0b3, 0x753f75de, - 0xd25ed2fd, 0x7dba7d20, 0x66ae6631, 0x3a5b3aa3, - 0x598a591c, 0x00000000, 0xcdbccd93, 0x1a9d1ae0, - 0xae6dae2c, 0x7fc17fab, 0x2bb12bc7, 0xbe0ebeb9, - 0xe080e0a0, 0x8a5d8a10, 0x3bd23b52, 0x64d564ba, - 0xd8a0d888, 0xe784e7a5, 0x5f075fe8, 0x1b141b11, - 0x2cb52cc2, 0xfc90fcb4, 0x312c3127, 0x80a38065, - 0x73b2732a, 0x0c730c81, 0x794c795f, 0x6b546b41, - 0x4b924b02, 0x53745369, 0x9436948f, 0x8351831f, - 0x2a382a36, 0xc4b0c49c, 0x22bd22c8, 0xd55ad5f8, - 0xbdfcbdc3, 0x48604878, 0xff62ffce, 0x4c964c07, - 0x416c4177, 0xc742c7e6, 0xebf7eb24, 0x1c101c14, - 0x5d7c5d63, 0x36283622, 0x672767c0, 0xe98ce9af, - 0x441344f9, 0x149514ea, 0xf59cf5bb, 0xcfc7cf18, - 0x3f243f2d, 0xc046c0e3, 0x723b72db, 0x5470546c, - 0x29ca294c, 0xf0e3f035, 0x088508fe, 0xc6cbc617, - 0xf311f34f, 0x8cd08ce4, 0xa493a459, 0xcab8ca96, - 0x68a6683b, 0xb883b84d, 0x38203828, 0xe5ffe52e, - 0xad9fad56, 0x0b770b84, 0xc8c3c81d, 0x99cc99ff, - 0x580358ed, 0x196f199a, 0x0e080e0a, 0x95bf957e, - 0x70407050, 0xf7e7f730, 0x6e2b6ecf, 0x1fe21f6e, - 0xb579b53d, 0x090c090f, 0x61aa6134, 0x57825716, - 0x9f419f0b, 0x9d3a9d80, 0x11ea1164, 0x25b925cd, - 0xafe4afdd, 0x459a4508, 0xdfa4df8d, 0xa397a35c, - 0xea7eead5, 0x35da3558, 0xed7aedd0, 0x431743fc, - 0xf866f8cb, 0xfb94fbb1, 0x37a137d3, 0xfa1dfa40, - 0xc23dc268, 0xb4f0b4cc, 0x32de325d, 0x9cb39c71, - 0x560b56e7, 0xe372e3da, 0x87a78760, 0x151c151b, - 0xf9eff93a, 0x63d163bf, 0x345334a9, 0x9a3e9a85, - 0xb18fb142, 0x7c337cd1, 0x8826889b, 0x3d5f3da6, - 0xa1eca1d7, 0xe476e4df, 0x812a8194, 0x91499101, - 0x0f810ffb, 0xee88eeaa, 0x16ee1661, 0xd721d773, - 0x97c497f5, 0xa51aa5a8, 0xfeebfe3f, 0x6dd96db5, - 0x78c578ae, 0xc539c56d, 0x1d991de5, 0x76cd76a4, - 0x3ead3edc, 0xcb31cb67, 0xb68bb647, 0xef01ef5b, - 0x1218121e, 0x602360c5, 0x6add6ab0, 0x4d1f4df6, - 0xce4ecee9, 0xde2dde7c, 0x55f9559d, 0x7e487e5a, - 0x214f21b2, 0x03f2037a, 0xa065a026, 0x5e8e5e19, - 0x5a785a66, 0x655c654b, 0x6258624e, 0xfd19fd45, - 0x068d06f4, 0x40e54086, 0xf298f2be, 0x335733ac, - 0x17671790, 0x057f058e, 0xe805e85e, 0x4f644f7d, - 0x89af896a, 0x10631095, 0x74b6742f, 0x0afe0a75, - 0x5cf55c92, 0x9bb79b74, 0x2d3c2d33, 0x30a530d6, - 0x2ece2e49, 0x49e94989, 0x46684672, 0x77447755, - 0xa8e0a8d8, 0x964d9604, 0x284328bd, 0xa969a929, - 0xd929d979, 0x862e8691, 0xd1acd187, 0xf415f44a, - 0x8d598d15, 0xd6a8d682, 0xb90ab9bc, 0x429e420d, - 0xf66ef6c1, 0x2f472fb8, 0xdddfdd06, 0x23342339, - 0xcc35cc62, 0xf16af1c4, 0xc1cfc112, 0x85dc85eb, - 0x8f228f9e, 0x71c971a1, 0x90c090f0, 0xaa9baa53, - 0x018901f1, 0x8bd48be1, 0x4eed4e8c, 0x8eab8e6f, - 0xab12aba2, 0x6fa26f3e, 0xe60de654, 0xdb52dbf2, - 0x92bb927b, 0xb702b7b6, 0x692f69ca, 0x39a939d9, - 0xd3d7d30c, 0xa761a723, 0xa21ea2ad, 0xc3b4c399, - 0x6c506c44, 0x07040705, 0x04f6047f, 0x27c22746, - 0xac16aca7, 0xd025d076, 0x50865013, 0xdc56dcf7, - 0x8455841a, 0xe109e151, 0x7abe7a25, 0x139113ef, - - 0xd939a9d9, 0x90176790, 0x719cb371, 0xd2a6e8d2, - 0x05070405, 0x9852fd98, 0x6580a365, 0xdfe476df, - 0x08459a08, 0x024b9202, 0xa0e080a0, 0x665a7866, - 0xddafe4dd, 0xb06addb0, 0xbf63d1bf, 0x362a3836, - 0x54e60d54, 0x4320c643, 0x62cc3562, 0xbef298be, - 0x1e12181e, 0x24ebf724, 0xd7a1ecd7, 0x77416c77, - 0xbd2843bd, 0x32bc7532, 0xd47b37d4, 0x9b88269b, - 0x700dfa70, 0xf94413f9, 0xb1fb94b1, 0x5a7e485a, - 0x7a03f27a, 0xe48cd0e4, 0x47b68b47, 0x3c24303c, - 0xa5e784a5, 0x416b5441, 0x06dddf06, 0xc56023c5, - 0x45fd1945, 0xa33a5ba3, 0x68c23d68, 0x158d5915, - 0x21ecf321, 0x3166ae31, 0x3e6fa23e, 0x16578216, - 0x95106395, 0x5bef015b, 0x4db8834d, 0x91862e91, - 0xb56dd9b5, 0x1f83511f, 0x53aa9b53, 0x635d7c63, - 0x3b68a63b, 0x3ffeeb3f, 0xd630a5d6, 0x257abe25, - 0xa7ac16a7, 0x0f090c0f, 0x35f0e335, 0x23a76123, - 0xf090c0f0, 0xafe98caf, 0x809d3a80, 0x925cf592, - 0x810c7381, 0x27312c27, 0x76d02576, 0xe7560be7, - 0x7b92bb7b, 0xe9ce4ee9, 0xf10189f1, 0x9f1e6b9f, - 0xa93453a9, 0xc4f16ac4, 0x99c3b499, 0x975bf197, - 0x8347e183, 0x6b18e66b, 0xc822bdc8, 0x0e98450e, - 0x6e1fe26e, 0xc9b3f4c9, 0x2f74b62f, 0xcbf866cb, - 0xff99ccff, 0xea1495ea, 0xed5803ed, 0xf7dc56f7, - 0xe18bd4e1, 0x1b151c1b, 0xada21ead, 0x0cd3d70c, - 0x2be2fb2b, 0x1dc8c31d, 0x195e8e19, 0xc22cb5c2, - 0x8949e989, 0x12c1cf12, 0x7e95bf7e, 0x207dba20, - 0x6411ea64, 0x840b7784, 0x6dc5396d, 0x6a89af6a, - 0xd17c33d1, 0xa171c9a1, 0xceff62ce, 0x37bb7137, - 0xfb0f81fb, 0x3db5793d, 0x51e10951, 0xdc3eaddc, - 0x2d3f242d, 0xa476cda4, 0x9d55f99d, 0xee82d8ee, - 0x8640e586, 0xae78c5ae, 0xcd25b9cd, 0x04964d04, - 0x55774455, 0x0a0e080a, 0x13508613, 0x30f7e730, - 0xd337a1d3, 0x40fa1d40, 0x3461aa34, 0x8c4eed8c, - 0xb3b006b3, 0x6c54706c, 0x2a73b22a, 0x523bd252, - 0x0b9f410b, 0x8b027b8b, 0x88d8a088, 0x4ff3114f, - 0x67cb3167, 0x4627c246, 0xc06727c0, 0xb4fc90b4, - 0x28382028, 0x7f04f67f, 0x78486078, 0x2ee5ff2e, - 0x074c9607, 0x4b655c4b, 0xc72bb1c7, 0x6f8eab6f, - 0x0d429e0d, 0xbbf59cbb, 0xf2db52f2, 0xf34a1bf3, - 0xa63d5fa6, 0x59a49359, 0xbcb90abc, 0x3af9ef3a, - 0xef1391ef, 0xfe0885fe, 0x01914901, 0x6116ee61, - 0x7cde2d7c, 0xb2214fb2, 0x42b18f42, 0xdb723bdb, - 0xb82f47b8, 0x48bf8748, 0x2cae6d2c, 0xe3c046e3, - 0x573cd657, 0x859a3e85, 0x29a96929, 0x7d4f647d, - 0x94812a94, 0x492ece49, 0x17c6cb17, 0xca692fca, - 0xc3bdfcc3, 0x5ca3975c, 0x5ee8055e, 0xd0ed7ad0, - 0x87d1ac87, 0x8e057f8e, 0xba64d5ba, 0xa8a51aa8, - 0xb7264bb7, 0xb9be0eb9, 0x6087a760, 0xf8d55af8, - 0x22362822, 0x111b1411, 0xde753fde, 0x79d92979, - 0xaaee88aa, 0x332d3c33, 0x5f794c5f, 0xb6b702b6, - 0x96cab896, 0x5835da58, 0x9cc4b09c, 0xfc4317fc, - 0x1a84551a, 0xf64d1ff6, 0x1c598a1c, 0x38b27d38, - 0xac3357ac, 0x18cfc718, 0xf4068df4, 0x69537469, - 0x749bb774, 0xf597c4f5, 0x56ad9f56, 0xdae372da, - 0xd5ea7ed5, 0x4af4154a, 0x9e8f229e, 0xa2ab12a2, - 0x4e62584e, 0xe85f07e8, 0xe51d99e5, 0x39233439, - 0xc1f66ec1, 0x446c5044, 0x5d32de5d, 0x72466872, - 0x26a06526, 0x93cdbc93, 0x03dadb03, 0xc6baf8c6, - 0xfa9ec8fa, 0x82d6a882, 0xcf6e2bcf, 0x50704050, - 0xeb85dceb, 0x750afe75, 0x8a93328a, 0x8ddfa48d, - 0x4c29ca4c, 0x141c1014, 0x73d72173, 0xccb4f0cc, - 0x09d4d309, 0x108a5d10, 0xe2510fe2, 0x00000000, - 0x9a196f9a, 0xe01a9de0, 0x8f94368f, 0xe6c742e6, - 0xecc94aec, 0xfdd25efd, 0xab7fc1ab, 0xd8a8e0d8}; - -NAMESPACE_END diff --git a/CryptoPP/twofish.cpp b/CryptoPP/twofish.cpp deleted file mode 100644 index 064f16c44..000000000 --- a/CryptoPP/twofish.cpp +++ /dev/null @@ -1,168 +0,0 @@ -// twofish.cpp - modified by Wei Dai from Matthew Skala's twofish.c -// The original code and all modifications are in the public domain. - -#include "pch.h" -#include "twofish.h" -#include "misc.h" - -NAMESPACE_BEGIN(CryptoPP) - -// compute (c * x^4) mod (x^4 + (a + 1/a) * x^3 + a * x^2 + (a + 1/a) * x + 1) -// over GF(256) -static inline unsigned int Mod(unsigned int c) -{ - static const unsigned int modulus = 0x14d; - unsigned int c2 = (c<<1) ^ ((c & 0x80) ? modulus : 0); - unsigned int c1 = c2 ^ (c>>1) ^ ((c & 1) ? (modulus>>1) : 0); - return c | (c1 << 8) | (c2 << 16) | (c1 << 24); -} - -// compute RS(12,8) code with the above polynomial as generator -// this is equivalent to multiplying by the RS matrix -static word32 ReedSolomon(word32 high, word32 low) -{ - for (unsigned int i=0; i<8; i++) - { - high = Mod(high>>24) ^ (high<<8) ^ (low>>24); - low <<= 8; - } - return high; -} - -inline word32 Twofish::Base::h0(word32 x, const word32 *key, unsigned int kLen) -{ - x = x | (x<<8) | (x<<16) | (x<<24); - switch(kLen) - { -#define Q(a, b, c, d, t) q[a][GETBYTE(t,0)] ^ (q[b][GETBYTE(t,1)] << 8) ^ (q[c][GETBYTE(t,2)] << 16) ^ (q[d][GETBYTE(t,3)] << 24) - case 4: x = Q(1, 0, 0, 1, x) ^ key[6]; - case 3: x = Q(1, 1, 0, 0, x) ^ key[4]; - case 2: x = Q(0, 1, 0, 1, x) ^ key[2]; - x = Q(0, 0, 1, 1, x) ^ key[0]; - } - return x; -} - -inline word32 Twofish::Base::h(word32 x, const word32 *key, unsigned int kLen) -{ - x = h0(x, key, kLen); - return mds[0][GETBYTE(x,0)] ^ mds[1][GETBYTE(x,1)] ^ mds[2][GETBYTE(x,2)] ^ mds[3][GETBYTE(x,3)]; -} - -void Twofish::Base::UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &) -{ - AssertValidKeyLength(keylength); - - unsigned int len = (keylength <= 16 ? 2 : (keylength <= 24 ? 3 : 4)); - SecBlock<word32> key(len*2); - GetUserKey(LITTLE_ENDIAN_ORDER, key.begin(), len*2, userKey, keylength); - - unsigned int i; - for (i=0; i<40; i+=2) - { - word32 a = h(i, key, len); - word32 b = rotlFixed(h(i+1, key+1, len), 8); - m_k[i] = a+b; - m_k[i+1] = rotlFixed(a+2*b, 9); - } - - SecBlock<word32> svec(2*len); - for (i=0; i<len; i++) - svec[2*(len-i-1)] = ReedSolomon(key[2*i+1], key[2*i]); - for (i=0; i<256; i++) - { - word32 t = h0(i, svec, len); - m_s[0*256+i] = mds[0][GETBYTE(t, 0)]; - m_s[1*256+i] = mds[1][GETBYTE(t, 1)]; - m_s[2*256+i] = mds[2][GETBYTE(t, 2)]; - m_s[3*256+i] = mds[3][GETBYTE(t, 3)]; - } -} - -#define G1(x) (m_s[0*256+GETBYTE(x,0)] ^ m_s[1*256+GETBYTE(x,1)] ^ m_s[2*256+GETBYTE(x,2)] ^ m_s[3*256+GETBYTE(x,3)]) -#define G2(x) (m_s[0*256+GETBYTE(x,3)] ^ m_s[1*256+GETBYTE(x,0)] ^ m_s[2*256+GETBYTE(x,1)] ^ m_s[3*256+GETBYTE(x,2)]) - -#define ENCROUND(n, a, b, c, d) \ - x = G1 (a); y = G2 (b); \ - x += y; y += x + k[2 * (n) + 1]; \ - (c) ^= x + k[2 * (n)]; \ - (c) = rotrFixed(c, 1); \ - (d) = rotlFixed(d, 1) ^ y - -#define ENCCYCLE(n) \ - ENCROUND (2 * (n), a, b, c, d); \ - ENCROUND (2 * (n) + 1, c, d, a, b) - -#define DECROUND(n, a, b, c, d) \ - x = G1 (a); y = G2 (b); \ - x += y; y += x; \ - (d) ^= y + k[2 * (n) + 1]; \ - (d) = rotrFixed(d, 1); \ - (c) = rotlFixed(c, 1); \ - (c) ^= (x + k[2 * (n)]) - -#define DECCYCLE(n) \ - DECROUND (2 * (n) + 1, c, d, a, b); \ - DECROUND (2 * (n), a, b, c, d) - -typedef BlockGetAndPut<word32, LittleEndian> Block; - -void Twofish::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 x, y, a, b, c, d; - - Block::Get(inBlock)(a)(b)(c)(d); - - a ^= m_k[0]; - b ^= m_k[1]; - c ^= m_k[2]; - d ^= m_k[3]; - - const word32 *k = m_k+8; - ENCCYCLE (0); - ENCCYCLE (1); - ENCCYCLE (2); - ENCCYCLE (3); - ENCCYCLE (4); - ENCCYCLE (5); - ENCCYCLE (6); - ENCCYCLE (7); - - c ^= m_k[4]; - d ^= m_k[5]; - a ^= m_k[6]; - b ^= m_k[7]; - - Block::Put(xorBlock, outBlock)(c)(d)(a)(b); -} - -void Twofish::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const -{ - word32 x, y, a, b, c, d; - - Block::Get(inBlock)(c)(d)(a)(b); - - c ^= m_k[4]; - d ^= m_k[5]; - a ^= m_k[6]; - b ^= m_k[7]; - - const word32 *k = m_k+8; - DECCYCLE (7); - DECCYCLE (6); - DECCYCLE (5); - DECCYCLE (4); - DECCYCLE (3); - DECCYCLE (2); - DECCYCLE (1); - DECCYCLE (0); - - a ^= m_k[0]; - b ^= m_k[1]; - c ^= m_k[2]; - d ^= m_k[3]; - - Block::Put(xorBlock, outBlock)(a)(b)(c)(d); -} - -NAMESPACE_END diff --git a/CryptoPP/twofish.h b/CryptoPP/twofish.h deleted file mode 100644 index 9ba2903bd..000000000 --- a/CryptoPP/twofish.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef CRYPTOPP_TWOFISH_H -#define CRYPTOPP_TWOFISH_H - -/** \file -*/ - -#include "seckey.h" -#include "secblock.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! _ -struct Twofish_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 32>, FixedRounds<16> -{ - static const char *StaticAlgorithmName() {return "Twofish";} -}; - -/// <a href="http://www.weidai.com/scan-mirror/cs.html#Twofish">Twofish</a> -class Twofish : public Twofish_Info, public BlockCipherDocumentation -{ - class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Twofish_Info> - { - public: - void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs ¶ms); - - protected: - static word32 h0(word32 x, const word32 *key, unsigned int kLen); - static word32 h(word32 x, const word32 *key, unsigned int kLen); - - static const byte q[2][256]; - static const word32 mds[4][256]; - - FixedSizeSecBlock<word32, 40> m_k; - FixedSizeSecBlock<word32, 4*256> m_s; - }; - - class CRYPTOPP_NO_VTABLE Enc : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - - class CRYPTOPP_NO_VTABLE Dec : public Base - { - public: - void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const; - }; - -public: - typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption; - typedef BlockCipherFinal<DECRYPTION, Dec> Decryption; -}; - -typedef Twofish::Encryption TwofishEncryption; -typedef Twofish::Decryption TwofishDecryption; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/whrlpool.cpp b/CryptoPP/whrlpool.cpp deleted file mode 100644 index 9da12e3da..000000000 --- a/CryptoPP/whrlpool.cpp +++ /dev/null @@ -1,701 +0,0 @@ -// whrlpool.cpp - originally modified by Kevin Springle from -// Paulo Barreto and Vincent Rijmen's public domain code, whirlpool.c. -// Updated to Whirlpool version 3.0, optimized and SSE version added by Wei Dai -// All modifications are placed in the public domain - -// This is the original introductory comment: - -/** - * The Whirlpool hashing function. - * - * <P> - * <b>References</b> - * - * <P> - * The Whirlpool algorithm was developed by - * <a href="mailto:pbarreto@scopus.com.br">Paulo S. L. M. Barreto</a> and - * <a href="mailto:vincent.rijmen@cryptomathic.com">Vincent Rijmen</a>. - * - * See - * P.S.L.M. Barreto, V. Rijmen, - * ``The Whirlpool hashing function,'' - * NESSIE submission, 2000 (tweaked version, 2001), - * <https://www.cosic.esat.kuleuven.ac.be/nessie/workshop/submissions/whirlpool.zip> - * - * @author Paulo S.L.M. Barreto - * @author Vincent Rijmen. - * - * @version 3.0 (2003.03.12) - * - * ============================================================================= - * - * Differences from version 2.1: - * - * - Suboptimal diffusion matrix replaced by cir(1, 1, 4, 1, 8, 5, 2, 9). - * - * ============================================================================= - * - * Differences from version 2.0: - * - * - Generation of ISO/IEC 10118-3 test vectors. - * - Bug fix: nonzero carry was ignored when tallying the data length - * (this bug apparently only manifested itself when feeding data - * in pieces rather than in a single chunk at once). - * - Support for MS Visual C++ 64-bit integer arithmetic. - * - * Differences from version 1.0: - * - * - Original S-box replaced by the tweaked, hardware-efficient version. - * - * ============================================================================= - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "pch.h" -#include "whrlpool.h" -#include "misc.h" -#include "cpu.h" - -NAMESPACE_BEGIN(CryptoPP) - -void Whirlpool_TestInstantiations() -{ - Whirlpool x; -} - -void Whirlpool::InitState(HashWordType *state) -{ - memset(state, 0, 8*sizeof(state[0])); -} - -void Whirlpool::TruncatedFinal(byte *hash, size_t size) -{ - ThrowIfInvalidTruncatedSize(size); - - PadLastBlock(32); - CorrectEndianess(m_data, m_data, 32); - - m_data[m_data.size()-4] = 0; - m_data[m_data.size()-3] = 0; - m_data[m_data.size()-2] = GetBitCountHi(); - m_data[m_data.size()-1] = GetBitCountLo(); - - Transform(m_state, m_data); - CorrectEndianess(m_state, m_state, DigestSize()); - memcpy(hash, m_state, size); - - Restart(); // reinit for next use -} - -/* - * The number of rounds of the internal dedicated block cipher. - */ -#define R 10 - -/* - * Though Whirlpool is endianness-neutral, the encryption tables are listed - * in BIG-ENDIAN format, which is adopted throughout this implementation - * (but little-endian notation would be equally suitable if consistently - * employed). - */ - -#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE -CRYPTOPP_ALIGN_DATA(16) static const word64 Whirlpool_C[4*256+R] CRYPTOPP_SECTION_ALIGN16 = { -#else -static const word64 Whirlpool_C[4*256+R] = { -#endif - W64LIT(0x18186018c07830d8), W64LIT(0x23238c2305af4626), W64LIT(0xc6c63fc67ef991b8), W64LIT(0xe8e887e8136fcdfb), - W64LIT(0x878726874ca113cb), W64LIT(0xb8b8dab8a9626d11), W64LIT(0x0101040108050209), W64LIT(0x4f4f214f426e9e0d), - W64LIT(0x3636d836adee6c9b), W64LIT(0xa6a6a2a6590451ff), W64LIT(0xd2d26fd2debdb90c), W64LIT(0xf5f5f3f5fb06f70e), - W64LIT(0x7979f979ef80f296), W64LIT(0x6f6fa16f5fcede30), W64LIT(0x91917e91fcef3f6d), W64LIT(0x52525552aa07a4f8), - W64LIT(0x60609d6027fdc047), W64LIT(0xbcbccabc89766535), W64LIT(0x9b9b569baccd2b37), W64LIT(0x8e8e028e048c018a), - W64LIT(0xa3a3b6a371155bd2), W64LIT(0x0c0c300c603c186c), W64LIT(0x7b7bf17bff8af684), W64LIT(0x3535d435b5e16a80), - W64LIT(0x1d1d741de8693af5), W64LIT(0xe0e0a7e05347ddb3), W64LIT(0xd7d77bd7f6acb321), W64LIT(0xc2c22fc25eed999c), - W64LIT(0x2e2eb82e6d965c43), W64LIT(0x4b4b314b627a9629), W64LIT(0xfefedffea321e15d), W64LIT(0x575741578216aed5), - W64LIT(0x15155415a8412abd), W64LIT(0x7777c1779fb6eee8), W64LIT(0x3737dc37a5eb6e92), W64LIT(0xe5e5b3e57b56d79e), - W64LIT(0x9f9f469f8cd92313), W64LIT(0xf0f0e7f0d317fd23), W64LIT(0x4a4a354a6a7f9420), W64LIT(0xdada4fda9e95a944), - W64LIT(0x58587d58fa25b0a2), W64LIT(0xc9c903c906ca8fcf), W64LIT(0x2929a429558d527c), W64LIT(0x0a0a280a5022145a), - W64LIT(0xb1b1feb1e14f7f50), W64LIT(0xa0a0baa0691a5dc9), W64LIT(0x6b6bb16b7fdad614), W64LIT(0x85852e855cab17d9), - W64LIT(0xbdbdcebd8173673c), W64LIT(0x5d5d695dd234ba8f), W64LIT(0x1010401080502090), W64LIT(0xf4f4f7f4f303f507), - W64LIT(0xcbcb0bcb16c08bdd), W64LIT(0x3e3ef83eedc67cd3), W64LIT(0x0505140528110a2d), W64LIT(0x676781671fe6ce78), - W64LIT(0xe4e4b7e47353d597), W64LIT(0x27279c2725bb4e02), W64LIT(0x4141194132588273), W64LIT(0x8b8b168b2c9d0ba7), - W64LIT(0xa7a7a6a7510153f6), W64LIT(0x7d7de97dcf94fab2), W64LIT(0x95956e95dcfb3749), W64LIT(0xd8d847d88e9fad56), - W64LIT(0xfbfbcbfb8b30eb70), W64LIT(0xeeee9fee2371c1cd), W64LIT(0x7c7ced7cc791f8bb), W64LIT(0x6666856617e3cc71), - W64LIT(0xdddd53dda68ea77b), W64LIT(0x17175c17b84b2eaf), W64LIT(0x4747014702468e45), W64LIT(0x9e9e429e84dc211a), - W64LIT(0xcaca0fca1ec589d4), W64LIT(0x2d2db42d75995a58), W64LIT(0xbfbfc6bf9179632e), W64LIT(0x07071c07381b0e3f), - W64LIT(0xadad8ead012347ac), W64LIT(0x5a5a755aea2fb4b0), W64LIT(0x838336836cb51bef), W64LIT(0x3333cc3385ff66b6), - W64LIT(0x636391633ff2c65c), W64LIT(0x02020802100a0412), W64LIT(0xaaaa92aa39384993), W64LIT(0x7171d971afa8e2de), - W64LIT(0xc8c807c80ecf8dc6), W64LIT(0x19196419c87d32d1), W64LIT(0x494939497270923b), W64LIT(0xd9d943d9869aaf5f), - W64LIT(0xf2f2eff2c31df931), W64LIT(0xe3e3abe34b48dba8), W64LIT(0x5b5b715be22ab6b9), W64LIT(0x88881a8834920dbc), - W64LIT(0x9a9a529aa4c8293e), W64LIT(0x262698262dbe4c0b), W64LIT(0x3232c8328dfa64bf), W64LIT(0xb0b0fab0e94a7d59), - W64LIT(0xe9e983e91b6acff2), W64LIT(0x0f0f3c0f78331e77), W64LIT(0xd5d573d5e6a6b733), W64LIT(0x80803a8074ba1df4), - W64LIT(0xbebec2be997c6127), W64LIT(0xcdcd13cd26de87eb), W64LIT(0x3434d034bde46889), W64LIT(0x48483d487a759032), - W64LIT(0xffffdbffab24e354), W64LIT(0x7a7af57af78ff48d), W64LIT(0x90907a90f4ea3d64), W64LIT(0x5f5f615fc23ebe9d), - W64LIT(0x202080201da0403d), W64LIT(0x6868bd6867d5d00f), W64LIT(0x1a1a681ad07234ca), W64LIT(0xaeae82ae192c41b7), - W64LIT(0xb4b4eab4c95e757d), W64LIT(0x54544d549a19a8ce), W64LIT(0x93937693ece53b7f), W64LIT(0x222288220daa442f), - W64LIT(0x64648d6407e9c863), W64LIT(0xf1f1e3f1db12ff2a), W64LIT(0x7373d173bfa2e6cc), W64LIT(0x12124812905a2482), - W64LIT(0x40401d403a5d807a), W64LIT(0x0808200840281048), W64LIT(0xc3c32bc356e89b95), W64LIT(0xecec97ec337bc5df), - W64LIT(0xdbdb4bdb9690ab4d), W64LIT(0xa1a1bea1611f5fc0), W64LIT(0x8d8d0e8d1c830791), W64LIT(0x3d3df43df5c97ac8), - W64LIT(0x97976697ccf1335b), W64LIT(0x0000000000000000), W64LIT(0xcfcf1bcf36d483f9), W64LIT(0x2b2bac2b4587566e), - W64LIT(0x7676c57697b3ece1), W64LIT(0x8282328264b019e6), W64LIT(0xd6d67fd6fea9b128), W64LIT(0x1b1b6c1bd87736c3), - W64LIT(0xb5b5eeb5c15b7774), W64LIT(0xafaf86af112943be), W64LIT(0x6a6ab56a77dfd41d), W64LIT(0x50505d50ba0da0ea), - W64LIT(0x45450945124c8a57), W64LIT(0xf3f3ebf3cb18fb38), W64LIT(0x3030c0309df060ad), W64LIT(0xefef9bef2b74c3c4), - W64LIT(0x3f3ffc3fe5c37eda), W64LIT(0x55554955921caac7), W64LIT(0xa2a2b2a2791059db), W64LIT(0xeaea8fea0365c9e9), - W64LIT(0x656589650fecca6a), W64LIT(0xbabad2bab9686903), W64LIT(0x2f2fbc2f65935e4a), W64LIT(0xc0c027c04ee79d8e), - W64LIT(0xdede5fdebe81a160), W64LIT(0x1c1c701ce06c38fc), W64LIT(0xfdfdd3fdbb2ee746), W64LIT(0x4d4d294d52649a1f), - W64LIT(0x92927292e4e03976), W64LIT(0x7575c9758fbceafa), W64LIT(0x06061806301e0c36), W64LIT(0x8a8a128a249809ae), - W64LIT(0xb2b2f2b2f940794b), W64LIT(0xe6e6bfe66359d185), W64LIT(0x0e0e380e70361c7e), W64LIT(0x1f1f7c1ff8633ee7), - W64LIT(0x6262956237f7c455), W64LIT(0xd4d477d4eea3b53a), W64LIT(0xa8a89aa829324d81), W64LIT(0x96966296c4f43152), - W64LIT(0xf9f9c3f99b3aef62), W64LIT(0xc5c533c566f697a3), W64LIT(0x2525942535b14a10), W64LIT(0x59597959f220b2ab), - W64LIT(0x84842a8454ae15d0), W64LIT(0x7272d572b7a7e4c5), W64LIT(0x3939e439d5dd72ec), W64LIT(0x4c4c2d4c5a619816), - W64LIT(0x5e5e655eca3bbc94), W64LIT(0x7878fd78e785f09f), W64LIT(0x3838e038ddd870e5), W64LIT(0x8c8c0a8c14860598), - W64LIT(0xd1d163d1c6b2bf17), W64LIT(0xa5a5aea5410b57e4), W64LIT(0xe2e2afe2434dd9a1), W64LIT(0x616199612ff8c24e), - W64LIT(0xb3b3f6b3f1457b42), W64LIT(0x2121842115a54234), W64LIT(0x9c9c4a9c94d62508), W64LIT(0x1e1e781ef0663cee), - W64LIT(0x4343114322528661), W64LIT(0xc7c73bc776fc93b1), W64LIT(0xfcfcd7fcb32be54f), W64LIT(0x0404100420140824), - W64LIT(0x51515951b208a2e3), W64LIT(0x99995e99bcc72f25), W64LIT(0x6d6da96d4fc4da22), W64LIT(0x0d0d340d68391a65), - W64LIT(0xfafacffa8335e979), W64LIT(0xdfdf5bdfb684a369), W64LIT(0x7e7ee57ed79bfca9), W64LIT(0x242490243db44819), - W64LIT(0x3b3bec3bc5d776fe), W64LIT(0xabab96ab313d4b9a), W64LIT(0xcece1fce3ed181f0), W64LIT(0x1111441188552299), - W64LIT(0x8f8f068f0c890383), W64LIT(0x4e4e254e4a6b9c04), W64LIT(0xb7b7e6b7d1517366), W64LIT(0xebeb8beb0b60cbe0), - W64LIT(0x3c3cf03cfdcc78c1), W64LIT(0x81813e817cbf1ffd), W64LIT(0x94946a94d4fe3540), W64LIT(0xf7f7fbf7eb0cf31c), - W64LIT(0xb9b9deb9a1676f18), W64LIT(0x13134c13985f268b), W64LIT(0x2c2cb02c7d9c5851), W64LIT(0xd3d36bd3d6b8bb05), - W64LIT(0xe7e7bbe76b5cd38c), W64LIT(0x6e6ea56e57cbdc39), W64LIT(0xc4c437c46ef395aa), W64LIT(0x03030c03180f061b), - W64LIT(0x565645568a13acdc), W64LIT(0x44440d441a49885e), W64LIT(0x7f7fe17fdf9efea0), W64LIT(0xa9a99ea921374f88), - W64LIT(0x2a2aa82a4d825467), W64LIT(0xbbbbd6bbb16d6b0a), W64LIT(0xc1c123c146e29f87), W64LIT(0x53535153a202a6f1), - W64LIT(0xdcdc57dcae8ba572), W64LIT(0x0b0b2c0b58271653), W64LIT(0x9d9d4e9d9cd32701), W64LIT(0x6c6cad6c47c1d82b), - W64LIT(0x3131c43195f562a4), W64LIT(0x7474cd7487b9e8f3), W64LIT(0xf6f6fff6e309f115), W64LIT(0x464605460a438c4c), - W64LIT(0xacac8aac092645a5), W64LIT(0x89891e893c970fb5), W64LIT(0x14145014a04428b4), W64LIT(0xe1e1a3e15b42dfba), - W64LIT(0x16165816b04e2ca6), W64LIT(0x3a3ae83acdd274f7), W64LIT(0x6969b9696fd0d206), W64LIT(0x09092409482d1241), - W64LIT(0x7070dd70a7ade0d7), W64LIT(0xb6b6e2b6d954716f), W64LIT(0xd0d067d0ceb7bd1e), W64LIT(0xeded93ed3b7ec7d6), - W64LIT(0xcccc17cc2edb85e2), W64LIT(0x424215422a578468), W64LIT(0x98985a98b4c22d2c), W64LIT(0xa4a4aaa4490e55ed), - W64LIT(0x2828a0285d885075), W64LIT(0x5c5c6d5cda31b886), W64LIT(0xf8f8c7f8933fed6b), W64LIT(0x8686228644a411c2), - - W64LIT(0xd818186018c07830), W64LIT(0x2623238c2305af46), W64LIT(0xb8c6c63fc67ef991), W64LIT(0xfbe8e887e8136fcd), - W64LIT(0xcb878726874ca113), W64LIT(0x11b8b8dab8a9626d), W64LIT(0x0901010401080502), W64LIT(0x0d4f4f214f426e9e), - W64LIT(0x9b3636d836adee6c), W64LIT(0xffa6a6a2a6590451), W64LIT(0x0cd2d26fd2debdb9), W64LIT(0x0ef5f5f3f5fb06f7), - W64LIT(0x967979f979ef80f2), W64LIT(0x306f6fa16f5fcede), W64LIT(0x6d91917e91fcef3f), W64LIT(0xf852525552aa07a4), - W64LIT(0x4760609d6027fdc0), W64LIT(0x35bcbccabc897665), W64LIT(0x379b9b569baccd2b), W64LIT(0x8a8e8e028e048c01), - W64LIT(0xd2a3a3b6a371155b), W64LIT(0x6c0c0c300c603c18), W64LIT(0x847b7bf17bff8af6), W64LIT(0x803535d435b5e16a), - W64LIT(0xf51d1d741de8693a), W64LIT(0xb3e0e0a7e05347dd), W64LIT(0x21d7d77bd7f6acb3), W64LIT(0x9cc2c22fc25eed99), - W64LIT(0x432e2eb82e6d965c), W64LIT(0x294b4b314b627a96), W64LIT(0x5dfefedffea321e1), W64LIT(0xd5575741578216ae), - W64LIT(0xbd15155415a8412a), W64LIT(0xe87777c1779fb6ee), W64LIT(0x923737dc37a5eb6e), W64LIT(0x9ee5e5b3e57b56d7), - W64LIT(0x139f9f469f8cd923), W64LIT(0x23f0f0e7f0d317fd), W64LIT(0x204a4a354a6a7f94), W64LIT(0x44dada4fda9e95a9), - W64LIT(0xa258587d58fa25b0), W64LIT(0xcfc9c903c906ca8f), W64LIT(0x7c2929a429558d52), W64LIT(0x5a0a0a280a502214), - W64LIT(0x50b1b1feb1e14f7f), W64LIT(0xc9a0a0baa0691a5d), W64LIT(0x146b6bb16b7fdad6), W64LIT(0xd985852e855cab17), - W64LIT(0x3cbdbdcebd817367), W64LIT(0x8f5d5d695dd234ba), W64LIT(0x9010104010805020), W64LIT(0x07f4f4f7f4f303f5), - W64LIT(0xddcbcb0bcb16c08b), W64LIT(0xd33e3ef83eedc67c), W64LIT(0x2d0505140528110a), W64LIT(0x78676781671fe6ce), - W64LIT(0x97e4e4b7e47353d5), W64LIT(0x0227279c2725bb4e), W64LIT(0x7341411941325882), W64LIT(0xa78b8b168b2c9d0b), - W64LIT(0xf6a7a7a6a7510153), W64LIT(0xb27d7de97dcf94fa), W64LIT(0x4995956e95dcfb37), W64LIT(0x56d8d847d88e9fad), - W64LIT(0x70fbfbcbfb8b30eb), W64LIT(0xcdeeee9fee2371c1), W64LIT(0xbb7c7ced7cc791f8), W64LIT(0x716666856617e3cc), - W64LIT(0x7bdddd53dda68ea7), W64LIT(0xaf17175c17b84b2e), W64LIT(0x454747014702468e), W64LIT(0x1a9e9e429e84dc21), - W64LIT(0xd4caca0fca1ec589), W64LIT(0x582d2db42d75995a), W64LIT(0x2ebfbfc6bf917963), W64LIT(0x3f07071c07381b0e), - W64LIT(0xacadad8ead012347), W64LIT(0xb05a5a755aea2fb4), W64LIT(0xef838336836cb51b), W64LIT(0xb63333cc3385ff66), - W64LIT(0x5c636391633ff2c6), W64LIT(0x1202020802100a04), W64LIT(0x93aaaa92aa393849), W64LIT(0xde7171d971afa8e2), - W64LIT(0xc6c8c807c80ecf8d), W64LIT(0xd119196419c87d32), W64LIT(0x3b49493949727092), W64LIT(0x5fd9d943d9869aaf), - W64LIT(0x31f2f2eff2c31df9), W64LIT(0xa8e3e3abe34b48db), W64LIT(0xb95b5b715be22ab6), W64LIT(0xbc88881a8834920d), - W64LIT(0x3e9a9a529aa4c829), W64LIT(0x0b262698262dbe4c), W64LIT(0xbf3232c8328dfa64), W64LIT(0x59b0b0fab0e94a7d), - W64LIT(0xf2e9e983e91b6acf), W64LIT(0x770f0f3c0f78331e), W64LIT(0x33d5d573d5e6a6b7), W64LIT(0xf480803a8074ba1d), - W64LIT(0x27bebec2be997c61), W64LIT(0xebcdcd13cd26de87), W64LIT(0x893434d034bde468), W64LIT(0x3248483d487a7590), - W64LIT(0x54ffffdbffab24e3), W64LIT(0x8d7a7af57af78ff4), W64LIT(0x6490907a90f4ea3d), W64LIT(0x9d5f5f615fc23ebe), - W64LIT(0x3d202080201da040), W64LIT(0x0f6868bd6867d5d0), W64LIT(0xca1a1a681ad07234), W64LIT(0xb7aeae82ae192c41), - W64LIT(0x7db4b4eab4c95e75), W64LIT(0xce54544d549a19a8), W64LIT(0x7f93937693ece53b), W64LIT(0x2f222288220daa44), - W64LIT(0x6364648d6407e9c8), W64LIT(0x2af1f1e3f1db12ff), W64LIT(0xcc7373d173bfa2e6), W64LIT(0x8212124812905a24), - W64LIT(0x7a40401d403a5d80), W64LIT(0x4808082008402810), W64LIT(0x95c3c32bc356e89b), W64LIT(0xdfecec97ec337bc5), - W64LIT(0x4ddbdb4bdb9690ab), W64LIT(0xc0a1a1bea1611f5f), W64LIT(0x918d8d0e8d1c8307), W64LIT(0xc83d3df43df5c97a), - W64LIT(0x5b97976697ccf133), W64LIT(0x0000000000000000), W64LIT(0xf9cfcf1bcf36d483), W64LIT(0x6e2b2bac2b458756), - W64LIT(0xe17676c57697b3ec), W64LIT(0xe68282328264b019), W64LIT(0x28d6d67fd6fea9b1), W64LIT(0xc31b1b6c1bd87736), - W64LIT(0x74b5b5eeb5c15b77), W64LIT(0xbeafaf86af112943), W64LIT(0x1d6a6ab56a77dfd4), W64LIT(0xea50505d50ba0da0), - W64LIT(0x5745450945124c8a), W64LIT(0x38f3f3ebf3cb18fb), W64LIT(0xad3030c0309df060), W64LIT(0xc4efef9bef2b74c3), - W64LIT(0xda3f3ffc3fe5c37e), W64LIT(0xc755554955921caa), W64LIT(0xdba2a2b2a2791059), W64LIT(0xe9eaea8fea0365c9), - W64LIT(0x6a656589650fecca), W64LIT(0x03babad2bab96869), W64LIT(0x4a2f2fbc2f65935e), W64LIT(0x8ec0c027c04ee79d), - W64LIT(0x60dede5fdebe81a1), W64LIT(0xfc1c1c701ce06c38), W64LIT(0x46fdfdd3fdbb2ee7), W64LIT(0x1f4d4d294d52649a), - W64LIT(0x7692927292e4e039), W64LIT(0xfa7575c9758fbcea), W64LIT(0x3606061806301e0c), W64LIT(0xae8a8a128a249809), - W64LIT(0x4bb2b2f2b2f94079), W64LIT(0x85e6e6bfe66359d1), W64LIT(0x7e0e0e380e70361c), W64LIT(0xe71f1f7c1ff8633e), - W64LIT(0x556262956237f7c4), W64LIT(0x3ad4d477d4eea3b5), W64LIT(0x81a8a89aa829324d), W64LIT(0x5296966296c4f431), - W64LIT(0x62f9f9c3f99b3aef), W64LIT(0xa3c5c533c566f697), W64LIT(0x102525942535b14a), W64LIT(0xab59597959f220b2), - W64LIT(0xd084842a8454ae15), W64LIT(0xc57272d572b7a7e4), W64LIT(0xec3939e439d5dd72), W64LIT(0x164c4c2d4c5a6198), - W64LIT(0x945e5e655eca3bbc), W64LIT(0x9f7878fd78e785f0), W64LIT(0xe53838e038ddd870), W64LIT(0x988c8c0a8c148605), - W64LIT(0x17d1d163d1c6b2bf), W64LIT(0xe4a5a5aea5410b57), W64LIT(0xa1e2e2afe2434dd9), W64LIT(0x4e616199612ff8c2), - W64LIT(0x42b3b3f6b3f1457b), W64LIT(0x342121842115a542), W64LIT(0x089c9c4a9c94d625), W64LIT(0xee1e1e781ef0663c), - W64LIT(0x6143431143225286), W64LIT(0xb1c7c73bc776fc93), W64LIT(0x4ffcfcd7fcb32be5), W64LIT(0x2404041004201408), - W64LIT(0xe351515951b208a2), W64LIT(0x2599995e99bcc72f), W64LIT(0x226d6da96d4fc4da), W64LIT(0x650d0d340d68391a), - W64LIT(0x79fafacffa8335e9), W64LIT(0x69dfdf5bdfb684a3), W64LIT(0xa97e7ee57ed79bfc), W64LIT(0x19242490243db448), - W64LIT(0xfe3b3bec3bc5d776), W64LIT(0x9aabab96ab313d4b), W64LIT(0xf0cece1fce3ed181), W64LIT(0x9911114411885522), - W64LIT(0x838f8f068f0c8903), W64LIT(0x044e4e254e4a6b9c), W64LIT(0x66b7b7e6b7d15173), W64LIT(0xe0ebeb8beb0b60cb), - W64LIT(0xc13c3cf03cfdcc78), W64LIT(0xfd81813e817cbf1f), W64LIT(0x4094946a94d4fe35), W64LIT(0x1cf7f7fbf7eb0cf3), - W64LIT(0x18b9b9deb9a1676f), W64LIT(0x8b13134c13985f26), W64LIT(0x512c2cb02c7d9c58), W64LIT(0x05d3d36bd3d6b8bb), - W64LIT(0x8ce7e7bbe76b5cd3), W64LIT(0x396e6ea56e57cbdc), W64LIT(0xaac4c437c46ef395), W64LIT(0x1b03030c03180f06), - W64LIT(0xdc565645568a13ac), W64LIT(0x5e44440d441a4988), W64LIT(0xa07f7fe17fdf9efe), W64LIT(0x88a9a99ea921374f), - W64LIT(0x672a2aa82a4d8254), W64LIT(0x0abbbbd6bbb16d6b), W64LIT(0x87c1c123c146e29f), W64LIT(0xf153535153a202a6), - W64LIT(0x72dcdc57dcae8ba5), W64LIT(0x530b0b2c0b582716), W64LIT(0x019d9d4e9d9cd327), W64LIT(0x2b6c6cad6c47c1d8), - W64LIT(0xa43131c43195f562), W64LIT(0xf37474cd7487b9e8), W64LIT(0x15f6f6fff6e309f1), W64LIT(0x4c464605460a438c), - W64LIT(0xa5acac8aac092645), W64LIT(0xb589891e893c970f), W64LIT(0xb414145014a04428), W64LIT(0xbae1e1a3e15b42df), - W64LIT(0xa616165816b04e2c), W64LIT(0xf73a3ae83acdd274), W64LIT(0x066969b9696fd0d2), W64LIT(0x4109092409482d12), - W64LIT(0xd77070dd70a7ade0), W64LIT(0x6fb6b6e2b6d95471), W64LIT(0x1ed0d067d0ceb7bd), W64LIT(0xd6eded93ed3b7ec7), - W64LIT(0xe2cccc17cc2edb85), W64LIT(0x68424215422a5784), W64LIT(0x2c98985a98b4c22d), W64LIT(0xeda4a4aaa4490e55), - W64LIT(0x752828a0285d8850), W64LIT(0x865c5c6d5cda31b8), W64LIT(0x6bf8f8c7f8933fed), W64LIT(0xc28686228644a411), - - W64LIT(0x30d818186018c078), W64LIT(0x462623238c2305af), W64LIT(0x91b8c6c63fc67ef9), W64LIT(0xcdfbe8e887e8136f), - W64LIT(0x13cb878726874ca1), W64LIT(0x6d11b8b8dab8a962), W64LIT(0x0209010104010805), W64LIT(0x9e0d4f4f214f426e), - W64LIT(0x6c9b3636d836adee), W64LIT(0x51ffa6a6a2a65904), W64LIT(0xb90cd2d26fd2debd), W64LIT(0xf70ef5f5f3f5fb06), - W64LIT(0xf2967979f979ef80), W64LIT(0xde306f6fa16f5fce), W64LIT(0x3f6d91917e91fcef), W64LIT(0xa4f852525552aa07), - W64LIT(0xc04760609d6027fd), W64LIT(0x6535bcbccabc8976), W64LIT(0x2b379b9b569baccd), W64LIT(0x018a8e8e028e048c), - W64LIT(0x5bd2a3a3b6a37115), W64LIT(0x186c0c0c300c603c), W64LIT(0xf6847b7bf17bff8a), W64LIT(0x6a803535d435b5e1), - W64LIT(0x3af51d1d741de869), W64LIT(0xddb3e0e0a7e05347), W64LIT(0xb321d7d77bd7f6ac), W64LIT(0x999cc2c22fc25eed), - W64LIT(0x5c432e2eb82e6d96), W64LIT(0x96294b4b314b627a), W64LIT(0xe15dfefedffea321), W64LIT(0xaed5575741578216), - W64LIT(0x2abd15155415a841), W64LIT(0xeee87777c1779fb6), W64LIT(0x6e923737dc37a5eb), W64LIT(0xd79ee5e5b3e57b56), - W64LIT(0x23139f9f469f8cd9), W64LIT(0xfd23f0f0e7f0d317), W64LIT(0x94204a4a354a6a7f), W64LIT(0xa944dada4fda9e95), - W64LIT(0xb0a258587d58fa25), W64LIT(0x8fcfc9c903c906ca), W64LIT(0x527c2929a429558d), W64LIT(0x145a0a0a280a5022), - W64LIT(0x7f50b1b1feb1e14f), W64LIT(0x5dc9a0a0baa0691a), W64LIT(0xd6146b6bb16b7fda), W64LIT(0x17d985852e855cab), - W64LIT(0x673cbdbdcebd8173), W64LIT(0xba8f5d5d695dd234), W64LIT(0x2090101040108050), W64LIT(0xf507f4f4f7f4f303), - W64LIT(0x8bddcbcb0bcb16c0), W64LIT(0x7cd33e3ef83eedc6), W64LIT(0x0a2d050514052811), W64LIT(0xce78676781671fe6), - W64LIT(0xd597e4e4b7e47353), W64LIT(0x4e0227279c2725bb), W64LIT(0x8273414119413258), W64LIT(0x0ba78b8b168b2c9d), - W64LIT(0x53f6a7a7a6a75101), W64LIT(0xfab27d7de97dcf94), W64LIT(0x374995956e95dcfb), W64LIT(0xad56d8d847d88e9f), - W64LIT(0xeb70fbfbcbfb8b30), W64LIT(0xc1cdeeee9fee2371), W64LIT(0xf8bb7c7ced7cc791), W64LIT(0xcc716666856617e3), - W64LIT(0xa77bdddd53dda68e), W64LIT(0x2eaf17175c17b84b), W64LIT(0x8e45474701470246), W64LIT(0x211a9e9e429e84dc), - W64LIT(0x89d4caca0fca1ec5), W64LIT(0x5a582d2db42d7599), W64LIT(0x632ebfbfc6bf9179), W64LIT(0x0e3f07071c07381b), - W64LIT(0x47acadad8ead0123), W64LIT(0xb4b05a5a755aea2f), W64LIT(0x1bef838336836cb5), W64LIT(0x66b63333cc3385ff), - W64LIT(0xc65c636391633ff2), W64LIT(0x041202020802100a), W64LIT(0x4993aaaa92aa3938), W64LIT(0xe2de7171d971afa8), - W64LIT(0x8dc6c8c807c80ecf), W64LIT(0x32d119196419c87d), W64LIT(0x923b494939497270), W64LIT(0xaf5fd9d943d9869a), - W64LIT(0xf931f2f2eff2c31d), W64LIT(0xdba8e3e3abe34b48), W64LIT(0xb6b95b5b715be22a), W64LIT(0x0dbc88881a883492), - W64LIT(0x293e9a9a529aa4c8), W64LIT(0x4c0b262698262dbe), W64LIT(0x64bf3232c8328dfa), W64LIT(0x7d59b0b0fab0e94a), - W64LIT(0xcff2e9e983e91b6a), W64LIT(0x1e770f0f3c0f7833), W64LIT(0xb733d5d573d5e6a6), W64LIT(0x1df480803a8074ba), - W64LIT(0x6127bebec2be997c), W64LIT(0x87ebcdcd13cd26de), W64LIT(0x68893434d034bde4), W64LIT(0x903248483d487a75), - W64LIT(0xe354ffffdbffab24), W64LIT(0xf48d7a7af57af78f), W64LIT(0x3d6490907a90f4ea), W64LIT(0xbe9d5f5f615fc23e), - W64LIT(0x403d202080201da0), W64LIT(0xd00f6868bd6867d5), W64LIT(0x34ca1a1a681ad072), W64LIT(0x41b7aeae82ae192c), - W64LIT(0x757db4b4eab4c95e), W64LIT(0xa8ce54544d549a19), W64LIT(0x3b7f93937693ece5), W64LIT(0x442f222288220daa), - W64LIT(0xc86364648d6407e9), W64LIT(0xff2af1f1e3f1db12), W64LIT(0xe6cc7373d173bfa2), W64LIT(0x248212124812905a), - W64LIT(0x807a40401d403a5d), W64LIT(0x1048080820084028), W64LIT(0x9b95c3c32bc356e8), W64LIT(0xc5dfecec97ec337b), - W64LIT(0xab4ddbdb4bdb9690), W64LIT(0x5fc0a1a1bea1611f), W64LIT(0x07918d8d0e8d1c83), W64LIT(0x7ac83d3df43df5c9), - W64LIT(0x335b97976697ccf1), W64LIT(0x0000000000000000), W64LIT(0x83f9cfcf1bcf36d4), W64LIT(0x566e2b2bac2b4587), - W64LIT(0xece17676c57697b3), W64LIT(0x19e68282328264b0), W64LIT(0xb128d6d67fd6fea9), W64LIT(0x36c31b1b6c1bd877), - W64LIT(0x7774b5b5eeb5c15b), W64LIT(0x43beafaf86af1129), W64LIT(0xd41d6a6ab56a77df), W64LIT(0xa0ea50505d50ba0d), - W64LIT(0x8a5745450945124c), W64LIT(0xfb38f3f3ebf3cb18), W64LIT(0x60ad3030c0309df0), W64LIT(0xc3c4efef9bef2b74), - W64LIT(0x7eda3f3ffc3fe5c3), W64LIT(0xaac755554955921c), W64LIT(0x59dba2a2b2a27910), W64LIT(0xc9e9eaea8fea0365), - W64LIT(0xca6a656589650fec), W64LIT(0x6903babad2bab968), W64LIT(0x5e4a2f2fbc2f6593), W64LIT(0x9d8ec0c027c04ee7), - W64LIT(0xa160dede5fdebe81), W64LIT(0x38fc1c1c701ce06c), W64LIT(0xe746fdfdd3fdbb2e), W64LIT(0x9a1f4d4d294d5264), - W64LIT(0x397692927292e4e0), W64LIT(0xeafa7575c9758fbc), W64LIT(0x0c3606061806301e), W64LIT(0x09ae8a8a128a2498), - W64LIT(0x794bb2b2f2b2f940), W64LIT(0xd185e6e6bfe66359), W64LIT(0x1c7e0e0e380e7036), W64LIT(0x3ee71f1f7c1ff863), - W64LIT(0xc4556262956237f7), W64LIT(0xb53ad4d477d4eea3), W64LIT(0x4d81a8a89aa82932), W64LIT(0x315296966296c4f4), - W64LIT(0xef62f9f9c3f99b3a), W64LIT(0x97a3c5c533c566f6), W64LIT(0x4a102525942535b1), W64LIT(0xb2ab59597959f220), - W64LIT(0x15d084842a8454ae), W64LIT(0xe4c57272d572b7a7), W64LIT(0x72ec3939e439d5dd), W64LIT(0x98164c4c2d4c5a61), - W64LIT(0xbc945e5e655eca3b), W64LIT(0xf09f7878fd78e785), W64LIT(0x70e53838e038ddd8), W64LIT(0x05988c8c0a8c1486), - W64LIT(0xbf17d1d163d1c6b2), W64LIT(0x57e4a5a5aea5410b), W64LIT(0xd9a1e2e2afe2434d), W64LIT(0xc24e616199612ff8), - W64LIT(0x7b42b3b3f6b3f145), W64LIT(0x42342121842115a5), W64LIT(0x25089c9c4a9c94d6), W64LIT(0x3cee1e1e781ef066), - W64LIT(0x8661434311432252), W64LIT(0x93b1c7c73bc776fc), W64LIT(0xe54ffcfcd7fcb32b), W64LIT(0x0824040410042014), - W64LIT(0xa2e351515951b208), W64LIT(0x2f2599995e99bcc7), W64LIT(0xda226d6da96d4fc4), W64LIT(0x1a650d0d340d6839), - W64LIT(0xe979fafacffa8335), W64LIT(0xa369dfdf5bdfb684), W64LIT(0xfca97e7ee57ed79b), W64LIT(0x4819242490243db4), - W64LIT(0x76fe3b3bec3bc5d7), W64LIT(0x4b9aabab96ab313d), W64LIT(0x81f0cece1fce3ed1), W64LIT(0x2299111144118855), - W64LIT(0x03838f8f068f0c89), W64LIT(0x9c044e4e254e4a6b), W64LIT(0x7366b7b7e6b7d151), W64LIT(0xcbe0ebeb8beb0b60), - W64LIT(0x78c13c3cf03cfdcc), W64LIT(0x1ffd81813e817cbf), W64LIT(0x354094946a94d4fe), W64LIT(0xf31cf7f7fbf7eb0c), - W64LIT(0x6f18b9b9deb9a167), W64LIT(0x268b13134c13985f), W64LIT(0x58512c2cb02c7d9c), W64LIT(0xbb05d3d36bd3d6b8), - W64LIT(0xd38ce7e7bbe76b5c), W64LIT(0xdc396e6ea56e57cb), W64LIT(0x95aac4c437c46ef3), W64LIT(0x061b03030c03180f), - W64LIT(0xacdc565645568a13), W64LIT(0x885e44440d441a49), W64LIT(0xfea07f7fe17fdf9e), W64LIT(0x4f88a9a99ea92137), - W64LIT(0x54672a2aa82a4d82), W64LIT(0x6b0abbbbd6bbb16d), W64LIT(0x9f87c1c123c146e2), W64LIT(0xa6f153535153a202), - W64LIT(0xa572dcdc57dcae8b), W64LIT(0x16530b0b2c0b5827), W64LIT(0x27019d9d4e9d9cd3), W64LIT(0xd82b6c6cad6c47c1), - W64LIT(0x62a43131c43195f5), W64LIT(0xe8f37474cd7487b9), W64LIT(0xf115f6f6fff6e309), W64LIT(0x8c4c464605460a43), - W64LIT(0x45a5acac8aac0926), W64LIT(0x0fb589891e893c97), W64LIT(0x28b414145014a044), W64LIT(0xdfbae1e1a3e15b42), - W64LIT(0x2ca616165816b04e), W64LIT(0x74f73a3ae83acdd2), W64LIT(0xd2066969b9696fd0), W64LIT(0x124109092409482d), - W64LIT(0xe0d77070dd70a7ad), W64LIT(0x716fb6b6e2b6d954), W64LIT(0xbd1ed0d067d0ceb7), W64LIT(0xc7d6eded93ed3b7e), - W64LIT(0x85e2cccc17cc2edb), W64LIT(0x8468424215422a57), W64LIT(0x2d2c98985a98b4c2), W64LIT(0x55eda4a4aaa4490e), - W64LIT(0x50752828a0285d88), W64LIT(0xb8865c5c6d5cda31), W64LIT(0xed6bf8f8c7f8933f), W64LIT(0x11c28686228644a4), - - W64LIT(0x7830d818186018c0), W64LIT(0xaf462623238c2305), W64LIT(0xf991b8c6c63fc67e), W64LIT(0x6fcdfbe8e887e813), - W64LIT(0xa113cb878726874c), W64LIT(0x626d11b8b8dab8a9), W64LIT(0x0502090101040108), W64LIT(0x6e9e0d4f4f214f42), - W64LIT(0xee6c9b3636d836ad), W64LIT(0x0451ffa6a6a2a659), W64LIT(0xbdb90cd2d26fd2de), W64LIT(0x06f70ef5f5f3f5fb), - W64LIT(0x80f2967979f979ef), W64LIT(0xcede306f6fa16f5f), W64LIT(0xef3f6d91917e91fc), W64LIT(0x07a4f852525552aa), - W64LIT(0xfdc04760609d6027), W64LIT(0x766535bcbccabc89), W64LIT(0xcd2b379b9b569bac), W64LIT(0x8c018a8e8e028e04), - W64LIT(0x155bd2a3a3b6a371), W64LIT(0x3c186c0c0c300c60), W64LIT(0x8af6847b7bf17bff), W64LIT(0xe16a803535d435b5), - W64LIT(0x693af51d1d741de8), W64LIT(0x47ddb3e0e0a7e053), W64LIT(0xacb321d7d77bd7f6), W64LIT(0xed999cc2c22fc25e), - W64LIT(0x965c432e2eb82e6d), W64LIT(0x7a96294b4b314b62), W64LIT(0x21e15dfefedffea3), W64LIT(0x16aed55757415782), - W64LIT(0x412abd15155415a8), W64LIT(0xb6eee87777c1779f), W64LIT(0xeb6e923737dc37a5), W64LIT(0x56d79ee5e5b3e57b), - W64LIT(0xd923139f9f469f8c), W64LIT(0x17fd23f0f0e7f0d3), W64LIT(0x7f94204a4a354a6a), W64LIT(0x95a944dada4fda9e), - W64LIT(0x25b0a258587d58fa), W64LIT(0xca8fcfc9c903c906), W64LIT(0x8d527c2929a42955), W64LIT(0x22145a0a0a280a50), - W64LIT(0x4f7f50b1b1feb1e1), W64LIT(0x1a5dc9a0a0baa069), W64LIT(0xdad6146b6bb16b7f), W64LIT(0xab17d985852e855c), - W64LIT(0x73673cbdbdcebd81), W64LIT(0x34ba8f5d5d695dd2), W64LIT(0x5020901010401080), W64LIT(0x03f507f4f4f7f4f3), - W64LIT(0xc08bddcbcb0bcb16), W64LIT(0xc67cd33e3ef83eed), W64LIT(0x110a2d0505140528), W64LIT(0xe6ce78676781671f), - W64LIT(0x53d597e4e4b7e473), W64LIT(0xbb4e0227279c2725), W64LIT(0x5882734141194132), W64LIT(0x9d0ba78b8b168b2c), - W64LIT(0x0153f6a7a7a6a751), W64LIT(0x94fab27d7de97dcf), W64LIT(0xfb374995956e95dc), W64LIT(0x9fad56d8d847d88e), - W64LIT(0x30eb70fbfbcbfb8b), W64LIT(0x71c1cdeeee9fee23), W64LIT(0x91f8bb7c7ced7cc7), W64LIT(0xe3cc716666856617), - W64LIT(0x8ea77bdddd53dda6), W64LIT(0x4b2eaf17175c17b8), W64LIT(0x468e454747014702), W64LIT(0xdc211a9e9e429e84), - W64LIT(0xc589d4caca0fca1e), W64LIT(0x995a582d2db42d75), W64LIT(0x79632ebfbfc6bf91), W64LIT(0x1b0e3f07071c0738), - W64LIT(0x2347acadad8ead01), W64LIT(0x2fb4b05a5a755aea), W64LIT(0xb51bef838336836c), W64LIT(0xff66b63333cc3385), - W64LIT(0xf2c65c636391633f), W64LIT(0x0a04120202080210), W64LIT(0x384993aaaa92aa39), W64LIT(0xa8e2de7171d971af), - W64LIT(0xcf8dc6c8c807c80e), W64LIT(0x7d32d119196419c8), W64LIT(0x70923b4949394972), W64LIT(0x9aaf5fd9d943d986), - W64LIT(0x1df931f2f2eff2c3), W64LIT(0x48dba8e3e3abe34b), W64LIT(0x2ab6b95b5b715be2), W64LIT(0x920dbc88881a8834), - W64LIT(0xc8293e9a9a529aa4), W64LIT(0xbe4c0b262698262d), W64LIT(0xfa64bf3232c8328d), W64LIT(0x4a7d59b0b0fab0e9), - W64LIT(0x6acff2e9e983e91b), W64LIT(0x331e770f0f3c0f78), W64LIT(0xa6b733d5d573d5e6), W64LIT(0xba1df480803a8074), - W64LIT(0x7c6127bebec2be99), W64LIT(0xde87ebcdcd13cd26), W64LIT(0xe468893434d034bd), W64LIT(0x75903248483d487a), - W64LIT(0x24e354ffffdbffab), W64LIT(0x8ff48d7a7af57af7), W64LIT(0xea3d6490907a90f4), W64LIT(0x3ebe9d5f5f615fc2), - W64LIT(0xa0403d202080201d), W64LIT(0xd5d00f6868bd6867), W64LIT(0x7234ca1a1a681ad0), W64LIT(0x2c41b7aeae82ae19), - W64LIT(0x5e757db4b4eab4c9), W64LIT(0x19a8ce54544d549a), W64LIT(0xe53b7f93937693ec), W64LIT(0xaa442f222288220d), - W64LIT(0xe9c86364648d6407), W64LIT(0x12ff2af1f1e3f1db), W64LIT(0xa2e6cc7373d173bf), W64LIT(0x5a24821212481290), - W64LIT(0x5d807a40401d403a), W64LIT(0x2810480808200840), W64LIT(0xe89b95c3c32bc356), W64LIT(0x7bc5dfecec97ec33), - W64LIT(0x90ab4ddbdb4bdb96), W64LIT(0x1f5fc0a1a1bea161), W64LIT(0x8307918d8d0e8d1c), W64LIT(0xc97ac83d3df43df5), - W64LIT(0xf1335b97976697cc), W64LIT(0x0000000000000000), W64LIT(0xd483f9cfcf1bcf36), W64LIT(0x87566e2b2bac2b45), - W64LIT(0xb3ece17676c57697), W64LIT(0xb019e68282328264), W64LIT(0xa9b128d6d67fd6fe), W64LIT(0x7736c31b1b6c1bd8), - W64LIT(0x5b7774b5b5eeb5c1), W64LIT(0x2943beafaf86af11), W64LIT(0xdfd41d6a6ab56a77), W64LIT(0x0da0ea50505d50ba), - W64LIT(0x4c8a574545094512), W64LIT(0x18fb38f3f3ebf3cb), W64LIT(0xf060ad3030c0309d), W64LIT(0x74c3c4efef9bef2b), - W64LIT(0xc37eda3f3ffc3fe5), W64LIT(0x1caac75555495592), W64LIT(0x1059dba2a2b2a279), W64LIT(0x65c9e9eaea8fea03), - W64LIT(0xecca6a656589650f), W64LIT(0x686903babad2bab9), W64LIT(0x935e4a2f2fbc2f65), W64LIT(0xe79d8ec0c027c04e), - W64LIT(0x81a160dede5fdebe), W64LIT(0x6c38fc1c1c701ce0), W64LIT(0x2ee746fdfdd3fdbb), W64LIT(0x649a1f4d4d294d52), - W64LIT(0xe0397692927292e4), W64LIT(0xbceafa7575c9758f), W64LIT(0x1e0c360606180630), W64LIT(0x9809ae8a8a128a24), - W64LIT(0x40794bb2b2f2b2f9), W64LIT(0x59d185e6e6bfe663), W64LIT(0x361c7e0e0e380e70), W64LIT(0x633ee71f1f7c1ff8), - W64LIT(0xf7c4556262956237), W64LIT(0xa3b53ad4d477d4ee), W64LIT(0x324d81a8a89aa829), W64LIT(0xf4315296966296c4), - W64LIT(0x3aef62f9f9c3f99b), W64LIT(0xf697a3c5c533c566), W64LIT(0xb14a102525942535), W64LIT(0x20b2ab59597959f2), - W64LIT(0xae15d084842a8454), W64LIT(0xa7e4c57272d572b7), W64LIT(0xdd72ec3939e439d5), W64LIT(0x6198164c4c2d4c5a), - W64LIT(0x3bbc945e5e655eca), W64LIT(0x85f09f7878fd78e7), W64LIT(0xd870e53838e038dd), W64LIT(0x8605988c8c0a8c14), - W64LIT(0xb2bf17d1d163d1c6), W64LIT(0x0b57e4a5a5aea541), W64LIT(0x4dd9a1e2e2afe243), W64LIT(0xf8c24e616199612f), - W64LIT(0x457b42b3b3f6b3f1), W64LIT(0xa542342121842115), W64LIT(0xd625089c9c4a9c94), W64LIT(0x663cee1e1e781ef0), - W64LIT(0x5286614343114322), W64LIT(0xfc93b1c7c73bc776), W64LIT(0x2be54ffcfcd7fcb3), W64LIT(0x1408240404100420), - W64LIT(0x08a2e351515951b2), W64LIT(0xc72f2599995e99bc), W64LIT(0xc4da226d6da96d4f), W64LIT(0x391a650d0d340d68), - W64LIT(0x35e979fafacffa83), W64LIT(0x84a369dfdf5bdfb6), W64LIT(0x9bfca97e7ee57ed7), W64LIT(0xb44819242490243d), - W64LIT(0xd776fe3b3bec3bc5), W64LIT(0x3d4b9aabab96ab31), W64LIT(0xd181f0cece1fce3e), W64LIT(0x5522991111441188), - W64LIT(0x8903838f8f068f0c), W64LIT(0x6b9c044e4e254e4a), W64LIT(0x517366b7b7e6b7d1), W64LIT(0x60cbe0ebeb8beb0b), - W64LIT(0xcc78c13c3cf03cfd), W64LIT(0xbf1ffd81813e817c), W64LIT(0xfe354094946a94d4), W64LIT(0x0cf31cf7f7fbf7eb), - W64LIT(0x676f18b9b9deb9a1), W64LIT(0x5f268b13134c1398), W64LIT(0x9c58512c2cb02c7d), W64LIT(0xb8bb05d3d36bd3d6), - W64LIT(0x5cd38ce7e7bbe76b), W64LIT(0xcbdc396e6ea56e57), W64LIT(0xf395aac4c437c46e), W64LIT(0x0f061b03030c0318), - W64LIT(0x13acdc565645568a), W64LIT(0x49885e44440d441a), W64LIT(0x9efea07f7fe17fdf), W64LIT(0x374f88a9a99ea921), - W64LIT(0x8254672a2aa82a4d), W64LIT(0x6d6b0abbbbd6bbb1), W64LIT(0xe29f87c1c123c146), W64LIT(0x02a6f153535153a2), - W64LIT(0x8ba572dcdc57dcae), W64LIT(0x2716530b0b2c0b58), W64LIT(0xd327019d9d4e9d9c), W64LIT(0xc1d82b6c6cad6c47), - W64LIT(0xf562a43131c43195), W64LIT(0xb9e8f37474cd7487), W64LIT(0x09f115f6f6fff6e3), W64LIT(0x438c4c464605460a), - W64LIT(0x2645a5acac8aac09), W64LIT(0x970fb589891e893c), W64LIT(0x4428b414145014a0), W64LIT(0x42dfbae1e1a3e15b), - W64LIT(0x4e2ca616165816b0), W64LIT(0xd274f73a3ae83acd), W64LIT(0xd0d2066969b9696f), W64LIT(0x2d12410909240948), - W64LIT(0xade0d77070dd70a7), W64LIT(0x54716fb6b6e2b6d9), W64LIT(0xb7bd1ed0d067d0ce), W64LIT(0x7ec7d6eded93ed3b), - W64LIT(0xdb85e2cccc17cc2e), W64LIT(0x578468424215422a), W64LIT(0xc22d2c98985a98b4), W64LIT(0x0e55eda4a4aaa449), - W64LIT(0x8850752828a0285d), W64LIT(0x31b8865c5c6d5cda), W64LIT(0x3fed6bf8f8c7f893), W64LIT(0xa411c28686228644), - - W64LIT(0x1823c6e887b8014f), - W64LIT(0x36a6d2f5796f9152), - W64LIT(0x60bc9b8ea30c7b35), - W64LIT(0x1de0d7c22e4bfe57), - W64LIT(0x157737e59ff04ada), - W64LIT(0x58c9290ab1a06b85), - W64LIT(0xbd5d10f4cb3e0567), - W64LIT(0xe427418ba77d95d8), - W64LIT(0xfbee7c66dd17479e), - W64LIT(0xca2dbf07ad5a8333) -}; - -// Whirlpool basic transformation. Transforms state based on block. -void Whirlpool::Transform(word64 *digest, const word64 *block) -{ -#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE - if (HasISSE()) - { - // MMX version has the same structure as C version below -#ifdef __GNUC__ - #if CRYPTOPP_BOOL_X64 - word64 workspace[16]; - #endif - __asm__ __volatile__ - ( - ".intel_syntax noprefix;" - AS_PUSH_IF86( bx) - AS2( mov AS_REG_6, WORD_REG(ax)) -#else - #if _MSC_VER < 1300 - AS_PUSH_IF86( bx) - #endif - AS2( lea AS_REG_6, [Whirlpool_C]) - AS2( mov WORD_REG(cx), digest) - AS2( mov WORD_REG(dx), block) -#endif -#if CRYPTOPP_BOOL_X86 - AS2( mov eax, esp) - AS2( and esp, -16) - AS2( sub esp, 16*8) - AS1( push eax) - #define SSE2_workspace esp+WORD_SZ -#else - #define SSE2_workspace %3 -#endif - AS2( xor esi, esi) - ASL(0) - AS2( movq mm0, [WORD_REG(cx)+8*WORD_REG(si)]) - AS2( movq [SSE2_workspace+8*WORD_REG(si)], mm0) // k - AS2( pxor mm0, [WORD_REG(dx)+8*WORD_REG(si)]) - AS2( movq [SSE2_workspace+64+8*WORD_REG(si)], mm0) // s - AS2( movq [WORD_REG(cx)+8*WORD_REG(si)], mm0) - AS1( inc WORD_REG(si)) - AS2( cmp WORD_REG(si), 8) - ASJ( jne, 0, b) - - AS2( xor esi, esi) - ASL(1) - -#define KSL0(a, b) AS2(movq mm##a, b) -#define KSL1(a, b) AS2(pxor mm##a, b) - -#define KSL(op, i, a, b, c, d) \ - AS2(mov eax, [SSE2_workspace+8*i])\ - AS2(movzx edi, al)\ - KSL##op(a, [AS_REG_6+3*2048+8*WORD_REG(di)])\ - AS2(movzx edi, ah)\ - KSL##op(b, [AS_REG_6+2*2048+8*WORD_REG(di)])\ - AS2(shr eax, 16)\ - AS2(movzx edi, al)\ - AS2(shr eax, 8)\ - KSL##op(c, [AS_REG_6+1*2048+8*WORD_REG(di)])\ - KSL##op(d, [AS_REG_6+0*2048+8*WORD_REG(ax)]) - -#define KSH0(a, b) \ - ASS(pshufw mm##a, mm##a, 1, 0, 3, 2)\ - AS2(pxor mm##a, b) -#define KSH1(a, b) \ - AS2(pxor mm##a, b) -#define KSH2(a, b) \ - AS2(pxor mm##a, b)\ - AS2(movq [SSE2_workspace+8*a], mm##a) - -#define KSH(op, i, a, b, c, d) \ - AS2(mov eax, [SSE2_workspace+8*((i+4)-8*((i+4)/8))+4])\ - AS2(movzx edi, al)\ - KSH##op(a, [AS_REG_6+3*2048+8*WORD_REG(di)])\ - AS2(movzx edi, ah)\ - KSH##op(b, [AS_REG_6+2*2048+8*WORD_REG(di)])\ - AS2(shr eax, 16)\ - AS2(movzx edi, al)\ - AS2(shr eax, 8)\ - KSH##op(c, [AS_REG_6+1*2048+8*WORD_REG(di)])\ - KSH##op(d, [AS_REG_6+0*2048+8*WORD_REG(ax)]) - -#define TSL(op, i, a, b, c, d) \ - AS2(mov eax, [SSE2_workspace+64+8*i])\ - AS2(movzx edi, al)\ - KSL##op(a, [AS_REG_6+3*2048+8*WORD_REG(di)])\ - AS2(movzx edi, ah)\ - KSL##op(b, [AS_REG_6+2*2048+8*WORD_REG(di)])\ - AS2(shr eax, 16)\ - AS2(movzx edi, al)\ - AS2(shr eax, 8)\ - KSL##op(c, [AS_REG_6+1*2048+8*WORD_REG(di)])\ - KSL##op(d, [AS_REG_6+0*2048+8*WORD_REG(ax)]) - -#define TSH0(a, b) \ - ASS(pshufw mm##a, mm##a, 1, 0, 3, 2)\ - AS2(pxor mm##a, [SSE2_workspace+8*a])\ - AS2(pxor mm##a, b) -#define TSH1(a, b) \ - AS2(pxor mm##a, b) -#define TSH2(a, b) \ - AS2(pxor mm##a, b)\ - AS2(movq [SSE2_workspace+64+8*a], mm##a) -#define TSH3(a, b) \ - AS2(pxor mm##a, b)\ - AS2(pxor mm##a, [WORD_REG(cx)+8*a])\ - AS2(movq [WORD_REG(cx)+8*a], mm##a) - -#define TSH(op, i, a, b, c, d) \ - AS2(mov eax, [SSE2_workspace+64+8*((i+4)-8*((i+4)/8))+4])\ - AS2(movzx edi, al)\ - TSH##op(a, [AS_REG_6+3*2048+8*WORD_REG(di)])\ - AS2(movzx edi, ah)\ - TSH##op(b, [AS_REG_6+2*2048+8*WORD_REG(di)])\ - AS2(shr eax, 16)\ - AS2(movzx edi, al)\ - AS2(shr eax, 8)\ - TSH##op(c, [AS_REG_6+1*2048+8*WORD_REG(di)])\ - TSH##op(d, [AS_REG_6+0*2048+8*WORD_REG(ax)]) - - KSL(0, 4, 3, 2, 1, 0) - KSL(0, 0, 7, 6, 5, 4) - KSL(1, 1, 0, 7, 6, 5) - KSL(1, 2, 1, 0, 7, 6) - KSL(1, 3, 2, 1, 0, 7) - KSL(1, 5, 4, 3, 2, 1) - KSL(1, 6, 5, 4, 3, 2) - KSL(1, 7, 6, 5, 4, 3) - KSH(0, 0, 7, 6, 5, 4) - KSH(0, 4, 3, 2, 1, 0) - KSH(1, 1, 0, 7, 6, 5) - KSH(1, 2, 1, 0, 7, 6) - KSH(1, 5, 4, 3, 2, 1) - KSH(1, 6, 5, 4, 3, 2) - KSH(2, 3, 2, 1, 0, 7) - KSH(2, 7, 6, 5, 4, 3) - - AS2( pxor mm0, [AS_REG_6 + 8*1024 + WORD_REG(si)*8]) - AS2( movq [SSE2_workspace], mm0) - - TSL(0, 4, 3, 2, 1, 0) - TSL(0, 0, 7, 6, 5, 4) - TSL(1, 1, 0, 7, 6, 5) - TSL(1, 2, 1, 0, 7, 6) - TSL(1, 3, 2, 1, 0, 7) - TSL(1, 5, 4, 3, 2, 1) - TSL(1, 6, 5, 4, 3, 2) - TSL(1, 7, 6, 5, 4, 3) - TSH(0, 0, 7, 6, 5, 4) - TSH(0, 4, 3, 2, 1, 0) - TSH(1, 1, 0, 7, 6, 5) - TSH(1, 2, 1, 0, 7, 6) - TSH(1, 5, 4, 3, 2, 1) - TSH(1, 6, 5, 4, 3, 2) - - AS1( inc WORD_REG(si)) - AS2( cmp WORD_REG(si), 10) - ASJ( je, 2, f) - - TSH(2, 3, 2, 1, 0, 7) - TSH(2, 7, 6, 5, 4, 3) - - ASJ( jmp, 1, b) - ASL(2) - - TSH(3, 3, 2, 1, 0, 7) - TSH(3, 7, 6, 5, 4, 3) - -#undef KSL -#undef KSH -#undef TSL -#undef TSH - - AS_POP_IF86( sp) - AS1( emms) - -#if defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER < 1300) - AS_POP_IF86( bx) -#endif -#ifdef __GNUC__ - ".att_syntax prefix;" - : - : "a" (Whirlpool_C), "c" (digest), "d" (block) - #if CRYPTOPP_BOOL_X64 - , "r" (workspace) - #endif - : "%esi", "%edi", "memory", "cc" - #if CRYPTOPP_BOOL_X64 - , "%r9" - #endif - ); -#endif - } - else -#endif // #ifdef CRYPTOPP_X86_ASM_AVAILABLE - { - word64 s[8]; // the cipher state - word64 k[8]; // the round key - - // Compute and apply K^0 to the cipher state - // Also apply part of the Miyaguchi-Preneel compression function - for (int i=0; i<8; i++) - digest[i] = s[i] = block[i] ^ (k[i] = digest[i]); - -#define KSL(op, i, a, b, c, d) \ - t = (word32)k[i];\ - w##a = Whirlpool_C[3*256 + (byte)t] ^ (op ? w##a : 0);\ - t >>= 8;\ - w##b = Whirlpool_C[2*256 + (byte)t] ^ (op ? w##b : 0);\ - t >>= 8;\ - w##c = Whirlpool_C[1*256 + (byte)t] ^ (op ? w##c : 0);\ - t >>= 8;\ - w##d = Whirlpool_C[0*256 + t] ^ (op ? w##d : 0); - -#define KSH(op, i, a, b, c, d) \ - t = (word32)(k[(i+4)%8]>>32);\ - w##a = Whirlpool_C[3*256 + (byte)t] ^ (op ? w##a : rotrFixed(w##a, 32));\ - if (op==2) k[a] = w##a;\ - t >>= 8;\ - w##b = Whirlpool_C[2*256 + (byte)t] ^ (op ? w##b : rotrFixed(w##b, 32));\ - if (op==2) k[b] = w##b;\ - t >>= 8;\ - w##c = Whirlpool_C[1*256 + (byte)t] ^ (op ? w##c : rotrFixed(w##c, 32));\ - if (op==2) k[c] = w##c;\ - t >>= 8;\ - w##d = Whirlpool_C[0*256 + t] ^ (op ? w##d : rotrFixed(w##d, 32));\ - if (op==2) k[d] = w##d;\ - -#define TSL(op, i, a, b, c, d) \ - t = (word32)s[i];\ - w##a = Whirlpool_C[3*256 + (byte)t] ^ (op ? w##a : 0);\ - t >>= 8;\ - w##b = Whirlpool_C[2*256 + (byte)t] ^ (op ? w##b : 0);\ - t >>= 8;\ - w##c = Whirlpool_C[1*256 + (byte)t] ^ (op ? w##c : 0);\ - t >>= 8;\ - w##d = Whirlpool_C[0*256 + t] ^ (op ? w##d : 0); - -#define TSH_OP(op, a, b) \ - w##a = Whirlpool_C[b*256 + (byte)t] ^ (op ? w##a : rotrFixed(w##a, 32) ^ k[a]);\ - if (op==2) s[a] = w##a;\ - if (op==3) digest[a] ^= w##a;\ - -#define TSH(op, i, a, b, c, d) \ - t = (word32)(s[(i+4)%8]>>32);\ - TSH_OP(op, a, 3);\ - t >>= 8;\ - TSH_OP(op, b, 2);\ - t >>= 8;\ - TSH_OP(op, c, 1);\ - t >>= 8;\ - TSH_OP(op, d, 0);\ - - // Iterate over all rounds: - int r=0; - while (true) - { - word64 w0, w1, w2, w3, w4, w5, w6, w7; // temporary storage - word32 t; - - KSL(0, 4, 3, 2, 1, 0) - KSL(0, 0, 7, 6, 5, 4) - KSL(1, 1, 0, 7, 6, 5) - KSL(1, 2, 1, 0, 7, 6) - KSL(1, 3, 2, 1, 0, 7) - KSL(1, 5, 4, 3, 2, 1) - KSL(1, 6, 5, 4, 3, 2) - KSL(1, 7, 6, 5, 4, 3) - KSH(0, 0, 7, 6, 5, 4) - KSH(0, 4, 3, 2, 1, 0) - KSH(1, 1, 0, 7, 6, 5) - KSH(1, 2, 1, 0, 7, 6) - KSH(1, 5, 4, 3, 2, 1) - KSH(1, 6, 5, 4, 3, 2) - KSH(2, 3, 2, 1, 0, 7) - KSH(2, 7, 6, 5, 4, 3) - - k[0] ^= Whirlpool_C[1024+r]; - - TSL(0, 4, 3, 2, 1, 0) - TSL(0, 0, 7, 6, 5, 4) - TSL(1, 1, 0, 7, 6, 5) - TSL(1, 2, 1, 0, 7, 6) - TSL(1, 3, 2, 1, 0, 7) - TSL(1, 5, 4, 3, 2, 1) - TSL(1, 6, 5, 4, 3, 2) - TSL(1, 7, 6, 5, 4, 3) - TSH(0, 0, 7, 6, 5, 4) - TSH(0, 4, 3, 2, 1, 0) - TSH(1, 1, 0, 7, 6, 5) - TSH(1, 2, 1, 0, 7, 6) - TSH(1, 5, 4, 3, 2, 1) - TSH(1, 6, 5, 4, 3, 2) - - if (++r < R) - { - TSH(2, 3, 2, 1, 0, 7) - TSH(2, 7, 6, 5, 4, 3) - } - else - { - TSH(3, 3, 2, 1, 0, 7) - TSH(3, 7, 6, 5, 4, 3) - break; - } - } - } -} - -NAMESPACE_END diff --git a/CryptoPP/whrlpool.h b/CryptoPP/whrlpool.h deleted file mode 100644 index 62c9d8a53..000000000 --- a/CryptoPP/whrlpool.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CRYPTOPP_WHIRLPOOL_H -#define CRYPTOPP_WHIRLPOOL_H - -#include "config.h" -#include "iterhash.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! <a href="http://www.cryptolounge.org/wiki/Whirlpool">Whirlpool</a> -class Whirlpool : public IteratedHashWithStaticTransform<word64, BigEndian, 64, 64, Whirlpool> -{ -public: - static void InitState(HashWordType *state); - static void Transform(word64 *digest, const word64 *data); - void TruncatedFinal(byte *hash, size_t size); - static const char * StaticAlgorithmName() {return "Whirlpool";} -}; - -NAMESPACE_END - -#endif diff --git a/CryptoPP/xtr.cpp b/CryptoPP/xtr.cpp deleted file mode 100644 index 673907054..000000000 --- a/CryptoPP/xtr.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// cryptlib.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "xtr.h" -#include "nbtheory.h" - -#include "algebra.cpp" - -NAMESPACE_BEGIN(CryptoPP) - -const GFP2Element & GFP2Element::Zero() -{ - return Singleton<GFP2Element>().Ref(); -} - -void XTR_FindPrimesAndGenerator(RandomNumberGenerator &rng, Integer &p, Integer &q, GFP2Element &g, unsigned int pbits, unsigned int qbits) -{ - assert(qbits > 9); // no primes exist for pbits = 10, qbits = 9 - assert(pbits > qbits); - - const Integer minQ = Integer::Power2(qbits - 1); - const Integer maxQ = Integer::Power2(qbits) - 1; - const Integer minP = Integer::Power2(pbits - 1); - const Integer maxP = Integer::Power2(pbits) - 1; - - Integer r1, r2; - do - { - bool qFound = q.Randomize(rng, minQ, maxQ, Integer::PRIME, 7, 12); - assert(qFound); - bool solutionsExist = SolveModularQuadraticEquation(r1, r2, 1, -1, 1, q); - assert(solutionsExist); - } while (!p.Randomize(rng, minP, maxP, Integer::PRIME, CRT(rng.GenerateBit()?r1:r2, q, 2, 3, EuclideanMultiplicativeInverse(p, 3)), 3*q)); - assert(((p.Squared() - p + 1) % q).IsZero()); - - GFP2_ONB<ModularArithmetic> gfp2(p); - GFP2Element three = gfp2.ConvertIn(3), t; - - while (true) - { - g.c1.Randomize(rng, Integer::Zero(), p-1); - g.c2.Randomize(rng, Integer::Zero(), p-1); - t = XTR_Exponentiate(g, p+1, p); - if (t.c1 == t.c2) - continue; - g = XTR_Exponentiate(g, (p.Squared()-p+1)/q, p); - if (g != three) - break; - } - assert(XTR_Exponentiate(g, q, p) == three); -} - -GFP2Element XTR_Exponentiate(const GFP2Element &b, const Integer &e, const Integer &p) -{ - unsigned int bitCount = e.BitCount(); - if (bitCount == 0) - return GFP2Element(-3, -3); - - // find the lowest bit of e that is 1 - unsigned int lowest1bit; - for (lowest1bit=0; e.GetBit(lowest1bit) == 0; lowest1bit++) {} - - GFP2_ONB<MontgomeryRepresentation> gfp2(p); - GFP2Element c = gfp2.ConvertIn(b); - GFP2Element cp = gfp2.PthPower(c); - GFP2Element S[5] = {gfp2.ConvertIn(3), c, gfp2.SpecialOperation1(c)}; - - // do all exponents bits except the lowest zeros starting from the top - unsigned int i; - for (i = e.BitCount() - 1; i>lowest1bit; i--) - { - if (e.GetBit(i)) - { - gfp2.RaiseToPthPower(S[0]); - gfp2.Accumulate(S[0], gfp2.SpecialOperation2(S[2], c, S[1])); - S[1] = gfp2.SpecialOperation1(S[1]); - S[2] = gfp2.SpecialOperation1(S[2]); - S[0].swap(S[1]); - } - else - { - gfp2.RaiseToPthPower(S[2]); - gfp2.Accumulate(S[2], gfp2.SpecialOperation2(S[0], cp, S[1])); - S[1] = gfp2.SpecialOperation1(S[1]); - S[0] = gfp2.SpecialOperation1(S[0]); - S[2].swap(S[1]); - } - } - - // now do the lowest zeros - while (i--) - S[1] = gfp2.SpecialOperation1(S[1]); - - return gfp2.ConvertOut(S[1]); -} - -template class AbstractRing<GFP2Element>; -template class AbstractGroup<GFP2Element>; - -NAMESPACE_END diff --git a/CryptoPP/xtr.h b/CryptoPP/xtr.h deleted file mode 100644 index 89d39f03e..000000000 --- a/CryptoPP/xtr.h +++ /dev/null @@ -1,215 +0,0 @@ -#ifndef CRYPTOPP_XTR_H -#define CRYPTOPP_XTR_H - -/** \file - "The XTR public key system" by Arjen K. Lenstra and Eric R. Verheul -*/ - -#include "modarith.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! an element of GF(p^2) -class GFP2Element -{ -public: - GFP2Element() {} - GFP2Element(const Integer &c1, const Integer &c2) : c1(c1), c2(c2) {} - GFP2Element(const byte *encodedElement, unsigned int size) - : c1(encodedElement, size/2), c2(encodedElement+size/2, size/2) {} - - void Encode(byte *encodedElement, unsigned int size) - { - c1.Encode(encodedElement, size/2); - c2.Encode(encodedElement+size/2, size/2); - } - - bool operator==(const GFP2Element &rhs) const {return c1 == rhs.c1 && c2 == rhs.c2;} - bool operator!=(const GFP2Element &rhs) const {return !operator==(rhs);} - - void swap(GFP2Element &a) - { - c1.swap(a.c1); - c2.swap(a.c2); - } - - static const GFP2Element & Zero(); - - Integer c1, c2; -}; - -//! GF(p^2), optimal normal basis -template <class F> -class GFP2_ONB : public AbstractRing<GFP2Element> -{ -public: - typedef F BaseField; - - GFP2_ONB(const Integer &p) : modp(p) - { - if (p%3 != 2) - throw InvalidArgument("GFP2_ONB: modulus must be equivalent to 2 mod 3"); - } - - const Integer& GetModulus() const {return modp.GetModulus();} - - GFP2Element ConvertIn(const Integer &a) const - { - t = modp.Inverse(modp.ConvertIn(a)); - return GFP2Element(t, t); - } - - GFP2Element ConvertIn(const GFP2Element &a) const - {return GFP2Element(modp.ConvertIn(a.c1), modp.ConvertIn(a.c2));} - - GFP2Element ConvertOut(const GFP2Element &a) const - {return GFP2Element(modp.ConvertOut(a.c1), modp.ConvertOut(a.c2));} - - bool Equal(const GFP2Element &a, const GFP2Element &b) const - { - return modp.Equal(a.c1, b.c1) && modp.Equal(a.c2, b.c2); - } - - const Element& Identity() const - { - return GFP2Element::Zero(); - } - - const Element& Add(const Element &a, const Element &b) const - { - result.c1 = modp.Add(a.c1, b.c1); - result.c2 = modp.Add(a.c2, b.c2); - return result; - } - - const Element& Inverse(const Element &a) const - { - result.c1 = modp.Inverse(a.c1); - result.c2 = modp.Inverse(a.c2); - return result; - } - - const Element& Double(const Element &a) const - { - result.c1 = modp.Double(a.c1); - result.c2 = modp.Double(a.c2); - return result; - } - - const Element& Subtract(const Element &a, const Element &b) const - { - result.c1 = modp.Subtract(a.c1, b.c1); - result.c2 = modp.Subtract(a.c2, b.c2); - return result; - } - - Element& Accumulate(Element &a, const Element &b) const - { - modp.Accumulate(a.c1, b.c1); - modp.Accumulate(a.c2, b.c2); - return a; - } - - Element& Reduce(Element &a, const Element &b) const - { - modp.Reduce(a.c1, b.c1); - modp.Reduce(a.c2, b.c2); - return a; - } - - bool IsUnit(const Element &a) const - { - return a.c1.NotZero() || a.c2.NotZero(); - } - - const Element& MultiplicativeIdentity() const - { - result.c1 = result.c2 = modp.Inverse(modp.MultiplicativeIdentity()); - return result; - } - - const Element& Multiply(const Element &a, const Element &b) const - { - t = modp.Add(a.c1, a.c2); - t = modp.Multiply(t, modp.Add(b.c1, b.c2)); - result.c1 = modp.Multiply(a.c1, b.c1); - result.c2 = modp.Multiply(a.c2, b.c2); - result.c1.swap(result.c2); - modp.Reduce(t, result.c1); - modp.Reduce(t, result.c2); - modp.Reduce(result.c1, t); - modp.Reduce(result.c2, t); - return result; - } - - const Element& MultiplicativeInverse(const Element &a) const - { - return result = Exponentiate(a, modp.GetModulus()-2); - } - - const Element& Square(const Element &a) const - { - const Integer &ac1 = (&a == &result) ? (t = a.c1) : a.c1; - result.c1 = modp.Multiply(modp.Subtract(modp.Subtract(a.c2, a.c1), a.c1), a.c2); - result.c2 = modp.Multiply(modp.Subtract(modp.Subtract(ac1, a.c2), a.c2), ac1); - return result; - } - - Element Exponentiate(const Element &a, const Integer &e) const - { - Integer edivp, emodp; - Integer::Divide(emodp, edivp, e, modp.GetModulus()); - Element b = PthPower(a); - return AbstractRing<GFP2Element>::CascadeExponentiate(a, emodp, b, edivp); - } - - const Element & PthPower(const Element &a) const - { - result = a; - result.c1.swap(result.c2); - return result; - } - - void RaiseToPthPower(Element &a) const - { - a.c1.swap(a.c2); - } - - // a^2 - 2a^p - const Element & SpecialOperation1(const Element &a) const - { - assert(&a != &result); - result = Square(a); - modp.Reduce(result.c1, a.c2); - modp.Reduce(result.c1, a.c2); - modp.Reduce(result.c2, a.c1); - modp.Reduce(result.c2, a.c1); - return result; - } - - // x * z - y * z^p - const Element & SpecialOperation2(const Element &x, const Element &y, const Element &z) const - { - assert(&x != &result && &y != &result && &z != &result); - t = modp.Add(x.c2, y.c2); - result.c1 = modp.Multiply(z.c1, modp.Subtract(y.c1, t)); - modp.Accumulate(result.c1, modp.Multiply(z.c2, modp.Subtract(t, x.c1))); - t = modp.Add(x.c1, y.c1); - result.c2 = modp.Multiply(z.c2, modp.Subtract(y.c2, t)); - modp.Accumulate(result.c2, modp.Multiply(z.c1, modp.Subtract(t, x.c2))); - return result; - } - -protected: - BaseField modp; - mutable GFP2Element result; - mutable Integer t; -}; - -void XTR_FindPrimesAndGenerator(RandomNumberGenerator &rng, Integer &p, Integer &q, GFP2Element &g, unsigned int pbits, unsigned int qbits); - -GFP2Element XTR_Exponentiate(const GFP2Element &b, const Integer &e, const Integer &p); - -NAMESPACE_END - -#endif diff --git a/CryptoPP/xtrcrypt.cpp b/CryptoPP/xtrcrypt.cpp deleted file mode 100644 index 20e78e7ca..000000000 --- a/CryptoPP/xtrcrypt.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// xtrcrypt.cpp - written and placed in the public domain by Wei Dai - -#include "pch.h" -#include "xtrcrypt.h" -#include "nbtheory.h" -#include "asn.h" -#include "argnames.h" - -NAMESPACE_BEGIN(CryptoPP) - -XTR_DH::XTR_DH(const Integer &p, const Integer &q, const GFP2Element &g) - : m_p(p), m_q(q), m_g(g) -{ -} - -XTR_DH::XTR_DH(RandomNumberGenerator &rng, unsigned int pbits, unsigned int qbits) -{ - XTR_FindPrimesAndGenerator(rng, m_p, m_q, m_g, pbits, qbits); -} - -XTR_DH::XTR_DH(BufferedTransformation &bt) -{ - BERSequenceDecoder seq(bt); - m_p.BERDecode(seq); - m_q.BERDecode(seq); - m_g.c1.BERDecode(seq); - m_g.c2.BERDecode(seq); - seq.MessageEnd(); -} - -void XTR_DH::DEREncode(BufferedTransformation &bt) const -{ - DERSequenceEncoder seq(bt); - m_p.DEREncode(seq); - m_q.DEREncode(seq); - m_g.c1.DEREncode(seq); - m_g.c2.DEREncode(seq); - seq.MessageEnd(); -} - -bool XTR_DH::Validate(RandomNumberGenerator &rng, unsigned int level) const -{ - bool pass = true; - pass = pass && m_p > Integer::One() && m_p.IsOdd(); - pass = pass && m_q > Integer::One() && m_q.IsOdd(); - GFP2Element three = GFP2_ONB<ModularArithmetic>(m_p).ConvertIn(3); - pass = pass && !(m_g.c1.IsNegative() || m_g.c2.IsNegative() || m_g.c1 >= m_p || m_g.c2 >= m_p || m_g == three); - if (level >= 1) - pass = pass && ((m_p.Squared()-m_p+1)%m_q).IsZero(); - if (level >= 2) - { - pass = pass && VerifyPrime(rng, m_p, level-2) && VerifyPrime(rng, m_q, level-2); - pass = pass && XTR_Exponentiate(m_g, (m_p.Squared()-m_p+1)/m_q, m_p) != three; - pass = pass && XTR_Exponentiate(m_g, m_q, m_p) == three; - } - return pass; -} - -bool XTR_DH::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const -{ - return GetValueHelper(this, name, valueType, pValue).Assignable() - CRYPTOPP_GET_FUNCTION_ENTRY(Modulus) - CRYPTOPP_GET_FUNCTION_ENTRY(SubgroupOrder) - CRYPTOPP_GET_FUNCTION_ENTRY(SubgroupGenerator) - ; -} - -void XTR_DH::AssignFrom(const NameValuePairs &source) -{ - AssignFromHelper(this, source) - CRYPTOPP_SET_FUNCTION_ENTRY(Modulus) - CRYPTOPP_SET_FUNCTION_ENTRY(SubgroupOrder) - CRYPTOPP_SET_FUNCTION_ENTRY(SubgroupGenerator) - ; -} - -void XTR_DH::GeneratePrivateKey(RandomNumberGenerator &rng, byte *privateKey) const -{ - Integer x(rng, Integer::Zero(), m_q-1); - x.Encode(privateKey, PrivateKeyLength()); -} - -void XTR_DH::GeneratePublicKey(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const -{ - Integer x(privateKey, PrivateKeyLength()); - GFP2Element y = XTR_Exponentiate(m_g, x, m_p); - y.Encode(publicKey, PublicKeyLength()); -} - -bool XTR_DH::Agree(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey) const -{ - GFP2Element w(otherPublicKey, PublicKeyLength()); - if (validateOtherPublicKey) - { - GFP2_ONB<ModularArithmetic> gfp2(m_p); - GFP2Element three = gfp2.ConvertIn(3); - if (w.c1.IsNegative() || w.c2.IsNegative() || w.c1 >= m_p || w.c2 >= m_p || w == three) - return false; - if (XTR_Exponentiate(w, m_q, m_p) != three) - return false; - } - Integer s(privateKey, PrivateKeyLength()); - GFP2Element z = XTR_Exponentiate(w, s, m_p); - z.Encode(agreedValue, AgreedValueLength()); - return true; -} - -NAMESPACE_END diff --git a/CryptoPP/xtrcrypt.h b/CryptoPP/xtrcrypt.h deleted file mode 100644 index 6aee1276c..000000000 --- a/CryptoPP/xtrcrypt.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef CRYPTOPP_XTRCRYPT_H -#define CRYPTOPP_XTRCRYPT_H - -/** \file - "The XTR public key system" by Arjen K. Lenstra and Eric R. Verheul -*/ - -#include "xtr.h" - -NAMESPACE_BEGIN(CryptoPP) - -//! XTR-DH with key validation - -class XTR_DH : public SimpleKeyAgreementDomain, public CryptoParameters -{ - typedef XTR_DH ThisClass; - -public: - XTR_DH(const Integer &p, const Integer &q, const GFP2Element &g); - XTR_DH(RandomNumberGenerator &rng, unsigned int pbits, unsigned int qbits); - XTR_DH(BufferedTransformation &domainParams); - - void DEREncode(BufferedTransformation &domainParams) const; - - bool Validate(RandomNumberGenerator &rng, unsigned int level) const; - bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const; - void AssignFrom(const NameValuePairs &source); - CryptoParameters & AccessCryptoParameters() {return *this;} - unsigned int AgreedValueLength() const {return 2*m_p.ByteCount();} - unsigned int PrivateKeyLength() const {return m_q.ByteCount();} - unsigned int PublicKeyLength() const {return 2*m_p.ByteCount();} - - void GeneratePrivateKey(RandomNumberGenerator &rng, byte *privateKey) const; - void GeneratePublicKey(RandomNumberGenerator &rng, const byte *privateKey, byte *publicKey) const; - bool Agree(byte *agreedValue, const byte *privateKey, const byte *otherPublicKey, bool validateOtherPublicKey=true) const; - - const Integer &GetModulus() const {return m_p;} - const Integer &GetSubgroupOrder() const {return m_q;} - const GFP2Element &GetSubgroupGenerator() const {return m_g;} - - void SetModulus(const Integer &p) {m_p = p;} - void SetSubgroupOrder(const Integer &q) {m_q = q;} - void SetSubgroupGenerator(const GFP2Element &g) {m_g = g;} - -private: - unsigned int ExponentBitLength() const; - - Integer m_p, m_q; - GFP2Element m_g; -}; - -NAMESPACE_END - -#endif diff --git a/VC2008/CryptoPP.vcproj b/VC2008/CryptoPP.vcproj index c0b6b5a00..45f01b22c 100644 --- a/VC2008/CryptoPP.vcproj +++ b/VC2008/CryptoPP.vcproj @@ -94,7 +94,7 @@ <Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\CryptoPP"
- IntermediateDirectory="$(ConfigurationName)\JsonCpp"
+ IntermediateDirectory="$(ConfigurationName)\CryptoPP"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
@@ -439,62 +439,6 @@ Filter=".cpp"
>
<File
- RelativePath="..\CryptoPP\3way.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\adler32.cpp"
>
<FileConfiguration
@@ -663,62 +607,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\arc4.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\asn.cpp"
>
<FileConfiguration
@@ -947,342 +835,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\bfinit.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\blowfish.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\blumshub.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\camellia.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\cast.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\casts.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\cbcmac.cpp"
>
<FileConfiguration
@@ -1577,114 +1129,10 @@ <File
RelativePath="..\CryptoPP\des.cpp"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\CryptoPP\dessp.cpp"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\CryptoPP\dh.cpp"
@@ -2441,62 +1889,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\fipstest.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\.\gcm.cpp"
>
</File>
@@ -2725,62 +2117,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\gost.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\hex.cpp"
>
<FileConfiguration
@@ -2949,118 +2285,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\ida.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\idea.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\integer.cpp"
>
<FileConfiguration
@@ -3236,118 +2460,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\mars.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\marss.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\md2.cpp"
>
<FileConfiguration
@@ -4140,58 +3252,6 @@ <File
RelativePath="..\CryptoPP\pssr.cpp"
>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
</File>
<File
RelativePath="..\CryptoPP\pubkey.cpp"
@@ -4418,174 +3478,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\rc2.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\rc5.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\rc6.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\rdtables.cpp"
>
<FileConfiguration
@@ -4698,62 +3590,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\ripemd.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\rng.cpp"
>
<FileConfiguration
@@ -5038,62 +3874,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\serpent.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\sha.cpp"
>
<FileConfiguration
@@ -5206,118 +3986,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\shark.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\sharkbox.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\simple.cpp"
>
<FileConfiguration
@@ -5374,62 +4042,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\skipjack.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\socketft.cpp"
>
<FileConfiguration
@@ -5710,62 +4322,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\tftables.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\tiger.cpp"
>
<FileConfiguration
@@ -5990,62 +4546,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\twofish.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\.\vmac.cpp"
>
</File>
@@ -6106,62 +4606,6 @@ </FileConfiguration>
</File>
<File
- RelativePath="..\CryptoPP\whrlpool.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\CryptoPP\winpipes.cpp"
>
<FileConfiguration
@@ -6217,128 +4661,12 @@ />
</FileConfiguration>
</File>
- <File
- RelativePath="..\CryptoPP\xtr.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\CryptoPP\xtrcrypt.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DLL-Import Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- </File>
</Filter>
<Filter
Name="Header Files"
Filter=".;.h"
>
<File
- RelativePath="..\CryptoPP\3way.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\adler32.h"
>
</File>
@@ -6383,22 +4711,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\blowfish.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\blumshub.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\camellia.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\cast.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\cbcmac.h"
>
</File>
@@ -6523,10 +4835,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\gost.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\gzip.h"
>
</File>
@@ -6543,14 +4851,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\ida.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\idea.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\integer.h"
>
</File>
@@ -6567,10 +4867,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\mars.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\md2.h"
>
</File>
@@ -6671,26 +4967,10 @@ >
</File>
<File
- RelativePath="..\CryptoPP\rc2.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\rc5.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\rc6.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\rijndael.h"
>
</File>
<File
- RelativePath="..\CryptoPP\ripemd.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\rng.h"
>
</File>
@@ -6723,10 +5003,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\serpent.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\sha.h"
>
</File>
@@ -6735,18 +5011,10 @@ >
</File>
<File
- RelativePath="..\CryptoPP\shark.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\simple.h"
>
</File>
<File
- RelativePath="..\CryptoPP\skipjack.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\smartptr.h"
>
</File>
@@ -6787,10 +5055,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\twofish.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\.\vmac.h"
>
</File>
@@ -6803,10 +5067,6 @@ >
</File>
<File
- RelativePath="..\CryptoPP\whrlpool.h"
- >
- </File>
- <File
RelativePath="..\CryptoPP\winpipes.h"
>
</File>
@@ -6814,14 +5074,6 @@ RelativePath="..\CryptoPP\words.h"
>
</File>
- <File
- RelativePath="..\CryptoPP\xtr.h"
- >
- </File>
- <File
- RelativePath="..\CryptoPP\xtrcrypt.h"
- >
- </File>
</Filter>
<Filter
Name="Miscellaneous"
|